Skip to content

Commit 81e78c7

Browse files
committed
Added guards against asking for properties on None in a couple of places.
- Legacy-Id: 15173
1 parent 2522082 commit 81e78c7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

ietf/doc/views_draft.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -954,7 +954,7 @@ def edit_shepherd(request, name):
954954
events = []
955955

956956
doc.shepherd = form.cleaned_data['shepherd']
957-
if not doc.shepherd.origin:
957+
if doc.shepherd and not doc.shepherd.origin:
958958
doc.shepherd.origin = 'shepherd: %s' % doc.name
959959
doc.shepherd.save()
960960

ietf/secr/drafts/forms.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def save(self, commit=False):
180180

181181
if 'shepherd' in self.changed_data:
182182
email = self.cleaned_data.get('shepherd')
183-
if not email.origin:
183+
if email and not email.origin:
184184
email.origin = 'shepherd: %s' % m.name
185185
email.save()
186186

0 commit comments

Comments
 (0)