Added guards against asking for properties on None in a couple of places.
- Legacy-Id: 15173
This commit is contained in:
parent
2522082979
commit
81e78c70a0
|
@ -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()
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in a new issue