Skip to content

Commit

Permalink
Fix edition of ADSForm when delegated to EPCI
Browse files Browse the repository at this point in the history
  • Loading branch information
brmzkw committed Apr 4, 2024
1 parent 842b91e commit 2dd070f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mesads/app/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ class ADSForm(forms.ModelForm):
class Meta:
model = ADS
fields = (
"epci_commune",
"number",
"ads_creation_date",
"ads_in_use",
Expand All @@ -110,7 +111,6 @@ def __init__(self, epci=None, *args, **kwargs):
super().__init__(*args, **kwargs)

if epci:
self.Meta.fields = self.Meta.fields + ("epci_commune",)
self.fields["epci_commune"] = forms.ModelChoiceField(
queryset=None,
widget=autocomplete.ListSelect2(),
Expand Down

0 comments on commit 2dd070f

Please sign in to comment.