diff --git a/aemo/forms.py b/aemo/forms.py index f7034be..1acd740 100644 --- a/aemo/forms.py +++ b/aemo/forms.py @@ -271,7 +271,7 @@ class PersonneForm(CityChMixin, BootstrapMixin, ReadOnlyableMixin, forms.ModelFo if role_id == 'ps': # personne significative excl = Role.ROLES_PARENTS + ['Enfant suivi', 'Enfant non-suivi'] self.fields['role'].queryset = Role.objects.filter( - famille=True + est_famille=True ).exclude(nom__in=excl) elif role_id == 'parent': self.fields['role'].queryset = Role.objects.filter(nom__in=Role.ROLES_PARENTS) @@ -298,7 +298,7 @@ class PersonneForm(CityChMixin, BootstrapMixin, ReadOnlyableMixin, forms.ModelFo if len(famille.parents()) == 2: excl.extend(Role.ROLES_PARENTS) self.fields['role'].queryset = Role.objects.filter( - famille=True + est_famille=True ).exclude(nom__in=excl) def clean_nom(self):