diff --git a/ietf/group/forms.py b/ietf/group/forms.py index 8e6aab106..1cbc56ee8 100644 --- a/ietf/group/forms.py +++ b/ietf/group/forms.py @@ -4,6 +4,8 @@ from __future__ import unicode_literals, print_function # Stdlib imports import re +import debug # pyflakes:ignore + # Django imports from django import forms from django.utils.html import mark_safe @@ -200,7 +202,7 @@ class GroupForm(forms.Form): cleaned_data = super(GroupForm, self).clean() state = cleaned_data.get('state', None) parent = cleaned_data.get('parent', None) - if state and (state.slug in ['bof', ] and not parent): + if state and (state.slug in ['bof', ] and 'parent' in self.fields and not parent): raise forms.ValidationError("You requested the creation of a BoF, but specified no parent area. A parent is required when creating a bof.") return cleaned_data