Don't blow up when checking if the logged-in user is a document author, if the user don't have a person record.

- Legacy-Id: 14221
This commit is contained in:
Henrik Levkowetz 2017-10-18 12:32:26 +00:00
parent 7bf04ab60d
commit 3a47fd79c8

View file

@ -152,6 +152,9 @@ def is_individual_draft_author(user, doc):
if not doc.group.type_id == "individ" :
return False
if not hasattr(user, 'person'):
return False
if user.person in doc.authors():
return True