Added an extra guard against trying to call .is_authenticated on a string.
- Legacy-Id: 4624
This commit is contained in:
parent
207f90b58f
commit
554d3a9d28
|
@ -16,7 +16,7 @@ class CommunityListNode(template.Node):
|
||||||
|
|
||||||
def render(self, context):
|
def render(self, context):
|
||||||
user = self.user.resolve(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 ''
|
return ''
|
||||||
lists = {'personal': CommunityList.objects.get_or_create(user=user)[0]}
|
lists = {'personal': CommunityList.objects.get_or_create(user=user)[0]}
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue