From 0f4d83488f297c8f724369d9da0ef3bc03da602e Mon Sep 17 00:00:00 2001 From: George Silva Date: Fri, 30 Aug 2024 10:58:45 -0300 Subject: [PATCH] changes choices to fix upsert --- src/planscape/impacts/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/planscape/impacts/serializers.py b/src/planscape/impacts/serializers.py index 972fab0ab..b47522fdb 100644 --- a/src/planscape/impacts/serializers.py +++ b/src/planscape/impacts/serializers.py @@ -5,6 +5,7 @@ from impacts.models import ( TreatmentPlan, TreatmentPrescription, + TreatmentPrescriptionAction, TreatmentPrescriptionType, ) from planning.models import ProjectArea, Scenario @@ -115,7 +116,7 @@ class UpsertTreamentPrescriptionSerializer(serializers.Serializer): queryset=ProjectArea.objects.all(), ) - action = serializers.ChoiceField(choices=TreatmentPrescriptionType.choices) + action = serializers.ChoiceField(choices=TreatmentPrescriptionAction.choices) stands = serializers.PrimaryKeyRelatedField( queryset=Stand.objects.all(),