From 41880da9630ba3f00cfa394bdf422d48f43b3bec Mon Sep 17 00:00:00 2001 From: George Silva <863039+george-silva@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:47:07 -0300 Subject: [PATCH] fix permission mistake (#1707) --- src/planscape/impacts/permissions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/planscape/impacts/permissions.py b/src/planscape/impacts/permissions.py index 4f7e16fb2..c38d65602 100644 --- a/src/planscape/impacts/permissions.py +++ b/src/planscape/impacts/permissions.py @@ -113,7 +113,10 @@ def has_permission(self, request, view): tx_plan = get_object_or_404(TreatmentPlan, id=tx_plan_pk) match view.action: case "create": - return TreatmentPlanPermission.can_add_scenario(request.user, tx_plan) + return TreatmentPlanPermission.can_change( + request.user, + tx_plan, + ) case "batch_delete": return TreatmentPlanPermission.can_remove(request.user, tx_plan) case _: