From 6b544486564f8b8374725097ac937afda3be8503 Mon Sep 17 00:00:00 2001 From: Pierre Narcisi Date: Mon, 18 Sep 2023 16:03:25 +0200 Subject: [PATCH] fix(permissions) fix asked permission --- backend/geonature/core/gn_synthese/routes.py | 1 + frontend/src/app/shared/alertInfoModule/alert-Info.component.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/geonature/core/gn_synthese/routes.py b/backend/geonature/core/gn_synthese/routes.py index edf04e4722..470cf67d36 100644 --- a/backend/geonature/core/gn_synthese/routes.py +++ b/backend/geonature/core/gn_synthese/routes.py @@ -1098,6 +1098,7 @@ def create_report(permissions): synthese = Synthese.query.options( Load(Synthese).raiseload("*"), + joinedload("nomenclature_sensitivity"), joinedload("cor_observers"), joinedload("digitiser"), joinedload("dataset"), diff --git a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts index 9f78949edc..5119aa88d7 100644 --- a/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts +++ b/frontend/src/app/shared/alertInfoModule/alert-Info.component.ts @@ -54,7 +54,7 @@ export class AlertInfoComponent implements OnInit, OnChanges { let moduleValidation = this.moduleService.getModule('VALIDATION'); this.canChangeAlert = - moduleValidation?.cruved?.R && moduleValidation?.cruved?.R > 0 && !isEmpty(this.alert); + moduleValidation?.cruved?.C && moduleValidation?.cruved?.C > 0 && !isEmpty(this.alert); } /** * Create new alert with /reports GET service