From 3a47fd79c87ada5c6e8dcb8592dc660d9d92a6cf Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 18 Oct 2017 12:32:26 +0000 Subject: [PATCH] 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 --- ietf/ietfauth/utils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ietf/ietfauth/utils.py b/ietf/ietfauth/utils.py index 90c8eefe7..f79846999 100644 --- a/ietf/ietfauth/utils.py +++ b/ietf/ietfauth/utils.py @@ -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