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:
parent
7bf04ab60d
commit
3a47fd79c8
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue