Fix govplan proposal form
This commit is contained in:
parent
196f5a2cc7
commit
b77275147f
1 changed files with 4 additions and 2 deletions
|
|
@ -97,10 +97,12 @@ class GovernmentPlanUpdateProposalForm(forms.ModelForm):
|
||||||
choices=[("", "---")] + PlanStatus.choices,
|
choices=[("", "---")] + PlanStatus.choices,
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
rating = forms.ChoiceField(
|
rating = forms.TypedChoiceField(
|
||||||
label=_("rating"),
|
label=_("rating"),
|
||||||
help_text=_("What's your rating of the current implementation?"),
|
help_text=_("What's your rating of the current implementation?"),
|
||||||
choices=[("", "---")] + PlanRating.choices,
|
choices=[("", "---")] + PlanRating.choices,
|
||||||
|
coerce=int,
|
||||||
|
empty_value="",
|
||||||
required=False,
|
required=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -128,5 +130,5 @@ class GovernmentPlanUpdateProposalForm(forms.ModelForm):
|
||||||
"data": data,
|
"data": data,
|
||||||
"timestamp": timezone.now().isoformat(),
|
"timestamp": timezone.now().isoformat(),
|
||||||
}
|
}
|
||||||
plan.save()
|
plan.save(update_fields=["proposals"])
|
||||||
return plan
|
return plan
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue