From 872762670c4a3e0e6c4e7632054e51fd5945e7a1 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Wed, 23 Jul 2014 07:28:26 +0000 Subject: [PATCH] Check for no doc.stream first, to avoid exception on doc.stream.slug. - Legacy-Id: 8201 --- ietf/ietfauth/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/ietfauth/utils.py b/ietf/ietfauth/utils.py index 432a124a6..4b00f64b0 100644 --- a/ietf/ietfauth/utils.py +++ b/ietf/ietfauth/utils.py @@ -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: