From 1a4e097fdc0523c8514e403810aeb56ccba6f72e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABl=20Mugnier?= Date: Mon, 30 Nov 2020 10:04:19 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20-=20Correction=20de=20la=20serialization?= =?UTF-8?q?=20de=20la=20commande=20de=20cr=C3=A9ationd=20'un=20payout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs | 2 +- Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs b/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs index 90d2b6c45..157c509ab 100644 --- a/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs +++ b/Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs @@ -13,6 +13,6 @@ public CreatePayoutCommand(RequestUser requestUser) : base(requestUser) } public Guid ProducerId { get; set; } - public IEnumerable TransferIds { get; set; } + public List TransferIds { get; set; } } } diff --git a/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs b/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs index 53ca7466c..28e683123 100644 --- a/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs +++ b/Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs @@ -223,7 +223,7 @@ private async Task> GetNextPayoutIdsAsync(int skip, int take, .ToListAsync(token); } - private async Task>>> GetNextNewPayoutIdsAsync(int skip, int take, CancellationToken token) + private async Task>>> GetNextNewPayoutIdsAsync(int skip, int take, CancellationToken token) { var producersTransfers = await _context.Transfers .Get(t => t.Status == TransactionStatus.Succeeded @@ -236,7 +236,7 @@ private async Task>>> GetNextNe .ToListAsync(token); var groupedProducers = producersTransfers.GroupBy(t => t.ProducerId); - return groupedProducers.Select(c => new KeyValuePair>(c.Key, c.Select(t => t.TransferId))); + return groupedProducers.Select(c => new KeyValuePair>(c.Key, c.Select(t => t.TransferId)?.ToList())); } } }