From 253ebe459742bad938a8d797155b5a1f90a95e2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABl=20Mugnier?= Date: Wed, 9 Dec 2020 23:47:01 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20-=20test=20invalide=20pour=20v=C3=A9rifie?= =?UTF-8?q?r=20si=20le=20withholding=20est=20en=20attente?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Commands/WithholdingCommandsHandler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sheaft.Application.Handlers/Commands/WithholdingCommandsHandler.cs b/Sheaft.Application.Handlers/Commands/WithholdingCommandsHandler.cs index 7f31515f6..1ce1a2ffb 100644 --- a/Sheaft.Application.Handlers/Commands/WithholdingCommandsHandler.cs +++ b/Sheaft.Application.Handlers/Commands/WithholdingCommandsHandler.cs @@ -80,7 +80,7 @@ public async Task> Handle(ProcessWithholdingCommand re if (withholding.Status == TransactionStatus.Succeeded) return Ok(withholding.Status); - if (withholding.Status != TransactionStatus.Failed) + if (withholding.Status != TransactionStatus.Failed && withholding.Status != TransactionStatus.Waiting) return Failed(new BadRequestException(MessageKind.Withholding_Cannot_Process_Pending)); using (var transaction = await _context.BeginTransactionAsync(token))