From 554d3a9d283306c7f6deb40ad7f141c6a6f28e20 Mon Sep 17 00:00:00 2001 From: Henrik Levkowetz Date: Fri, 20 Jul 2012 11:35:05 +0000 Subject: [PATCH] Added an extra guard against trying to call .is_authenticated on a string. - Legacy-Id: 4624 --- ietf/community/templatetags/community_tags.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/community/templatetags/community_tags.py b/ietf/community/templatetags/community_tags.py index 3be642c25..5addac178 100644 --- a/ietf/community/templatetags/community_tags.py +++ b/ietf/community/templatetags/community_tags.py @@ -16,7 +16,7 @@ class CommunityListNode(template.Node): def render(self, context): user = self.user.resolve(context) - if not user or not user.is_authenticated(): + if not (user and hasattr(user, "is_authenticated") and user.is_authenticated() ): return '' lists = {'personal': CommunityList.objects.get_or_create(user=user)[0]} try: