From 7c033d3daa6f3656242357c9a07973116333e24a Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 15 Jun 2016 20:02:51 +0000 Subject: [PATCH] Only check state.slug in GroupForm.clean() if state is set. - Legacy-Id: 11388 --- ietf/group/views_edit.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/group/views_edit.py b/ietf/group/views_edit.py index a3679ebc3..ddd3b4596 100644 --- a/ietf/group/views_edit.py +++ b/ietf/group/views_edit.py @@ -137,7 +137,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.slug in ['bof', ] and not parent: + if state and (state.slug in ['bof', ] 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