Skip to content

Commit 8032224

Browse files
Merge pull request #93 from StuartFerguson/bug/#91_recordproductalwaysonsale
Fix bug when trying to record on invalid estate
2 parents 28a42fa + e2d7954 commit 8032224

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

TransactionProcessor.BusinessLogic/Services/TransactionDomainService.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,9 +185,12 @@ await this.TransactionAggregateManager.StartTransaction(transactionId,
185185
transactionAmount,
186186
cancellationToken);
187187

188-
// Add the product details
189-
await this.TransactionAggregateManager.AddProductDetails(estateId, transactionId, contractId, productId, cancellationToken);
190-
188+
// Add the product details (unless invalid estate)
189+
if (validationResult.responseCode != TransactionResponseCode.InvalidEstateId)
190+
{
191+
await this.TransactionAggregateManager.AddProductDetails(estateId, transactionId, contractId, productId, cancellationToken);
192+
}
193+
191194
if (validationResult.responseCode == TransactionResponseCode.Success)
192195
{
193196
// Record any additional request metadata

0 commit comments

Comments
 (0)