From e1c3f74cd40c2e94b189b835c73f60ce0f77985f Mon Sep 17 00:00:00 2001 From: TekH Date: Thu, 16 Apr 2026 10:22:31 +0200 Subject: [PATCH] Prevent rec action invocation if batch has results Add validation in InvokeRecActionViewsCommandHandler to check for existing results before invoking rec actions for a batch. Throw BadRequestException if results are found to avoid duplicate processing. Add necessary using statements for exceptions and queries. --- .../Commands/InvokeBatchRecActionViewsCommand.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionViewsCommand.cs b/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionViewsCommand.cs index c44e927..aa3b1ee 100644 --- a/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionViewsCommand.cs +++ b/src/ReC.Application/RecActions/Commands/InvokeBatchRecActionViewsCommand.cs @@ -1,7 +1,9 @@ -using MediatR; +using DigitalData.Core.Exceptions; +using MediatR; using Microsoft.Extensions.Logging; using ReC.Application.Common.Exceptions; using ReC.Application.RecActions.Queries; +using ReC.Application.Results.Queries; using ReC.Domain.Constants; namespace ReC.Application.RecActions.Commands; @@ -16,6 +18,11 @@ public class InvokeRecActionViewsCommandHandler(ISender sender, ILogger