Check for no doc.stream first, to avoid exception on doc.stream.slug.

- Legacy-Id: 8201
This commit is contained in:
Henrik Levkowetz 2014-07-23 07:28:26 +00:00
parent a816098ee1
commit 872762670c

View file

@ -109,7 +109,7 @@ def is_authorized_in_doc_stream(user, doc):
group_req = None
if (doc.stream.slug == "ietf" or not doc.stream) and has_role(user, ["Area Director"]):
if (not doc.stream or doc.stream.slug == "ietf") and has_role(user, ["Area Director"]):
return True
if not doc.stream: