diff --git a/ietf/doc/views_draft.py b/ietf/doc/views_draft.py index 38c9463d1..fdaea6713 100644 --- a/ietf/doc/views_draft.py +++ b/ietf/doc/views_draft.py @@ -954,7 +954,7 @@ def edit_shepherd(request, name): events = [] doc.shepherd = form.cleaned_data['shepherd'] - if not doc.shepherd.origin: + if doc.shepherd and not doc.shepherd.origin: doc.shepherd.origin = 'shepherd: %s' % doc.name doc.shepherd.save() diff --git a/ietf/secr/drafts/forms.py b/ietf/secr/drafts/forms.py index c12321814..db7af4d39 100644 --- a/ietf/secr/drafts/forms.py +++ b/ietf/secr/drafts/forms.py @@ -180,7 +180,7 @@ class EditModelForm(forms.ModelForm): if 'shepherd' in self.changed_data: email = self.cleaned_data.get('shepherd') - if not email.origin: + if email and not email.origin: email.origin = 'shepherd: %s' % m.name email.save()