From d8959d4180be1e360f0eaf931655070dd35c1080 Mon Sep 17 00:00:00 2001 From: "CITE\\spapacharalampous" Date: Mon, 26 Aug 2024 16:24:59 +0300 Subject: [PATCH] fixes --- .../opencdmp/controllers/DescriptionWorkflowController.java | 1 - .../java/org/opencdmp/controllers/PlanWorkflowController.java | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/backend/web/src/main/java/org/opencdmp/controllers/DescriptionWorkflowController.java b/backend/web/src/main/java/org/opencdmp/controllers/DescriptionWorkflowController.java index ef88ab025..f5fcfd332 100644 --- a/backend/web/src/main/java/org/opencdmp/controllers/DescriptionWorkflowController.java +++ b/backend/web/src/main/java/org/opencdmp/controllers/DescriptionWorkflowController.java @@ -158,7 +158,6 @@ public class DescriptionWorkflowController { query = query.tenantIds(this.tenantScope.getTenant()); DescriptionWorkflow model = this.builderFactory.builder(DescriptionWorkflowBuilder.class).build(fieldSet, query.firstAs(fieldSet)); - if (model == null) throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{DescriptionWorkflow.class.getSimpleName()}, LocaleContextHolder.getLocale())); this.auditService.track(AuditableAction.DescriptionWorkflow_Lookup, "fieldSet", fieldSet); diff --git a/backend/web/src/main/java/org/opencdmp/controllers/PlanWorkflowController.java b/backend/web/src/main/java/org/opencdmp/controllers/PlanWorkflowController.java index e2ccac597..e994c5763 100644 --- a/backend/web/src/main/java/org/opencdmp/controllers/PlanWorkflowController.java +++ b/backend/web/src/main/java/org/opencdmp/controllers/PlanWorkflowController.java @@ -159,7 +159,7 @@ public class PlanWorkflowController { public PlanWorkflow GetByCurrentTenant( @Parameter(name = "fieldSet", description = SwaggerHelpers.Commons.fieldset_description, required = true) FieldSet fieldSet, Locale locale - ) throws MyApplicationException, MyForbiddenException, MyNotFoundException, InvalidApplicationException { + ) throws MyApplicationException, MyForbiddenException, InvalidApplicationException { logger.debug(new MapLogEntry("retrieving" + PlanWorkflow.class.getSimpleName()).And("fields", fieldSet)); this.censorFactory.censor(PlanWorkflowCensor.class).censor(fieldSet, null); @@ -172,8 +172,6 @@ public class PlanWorkflowController { query = query.tenantIds(this.tenantScope.getTenant()); PlanWorkflow model = this.builderFactory.builder(PlanWorkflowBuilder.class).build(fieldSet, query.firstAs(fieldSet)); - if (model == null) - throw new MyNotFoundException(this.messageSource.getMessage("General_ItemNotFound", new Object[]{PlanWorkflow.class.getSimpleName()}, LocaleContextHolder.getLocale())); this.auditService.track(AuditableAction.PlanWorkflow_Lookup, "fields", fieldSet);