Make sure BoF states don't show up for RGs

- Legacy-Id: 7564
This commit is contained in:
Ole Laursen 2014-04-02 11:44:17 +00:00
parent 8dabf4cd79
commit 25d37c04f3

View file

@ -48,6 +48,9 @@ class GroupForm(forms.Form):
super(self.__class__, self).__init__(*args, **kwargs)
if self.group_type == "rg":
self.fields["state"].queryset = self.fields["state"].queryset.exclude(slug__in=("bof", "bof-conc"))
# if previous AD is now ex-AD, append that person to the list
ad_pk = self.initial.get('ad')
choices = self.fields['ad'].choices