Added an extra guard against trying to call .is_authenticated on a string.

- Legacy-Id: 4624
This commit is contained in:
Henrik Levkowetz 2012-07-20 11:35:05 +00:00
parent 207f90b58f
commit 554d3a9d28

View file

@ -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: