Skip to content

Commit 554d3a9

Browse files
committed
Added an extra guard against trying to call .is_authenticated on a string.
- Legacy-Id: 4624
1 parent 207f90b commit 554d3a9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/community/templatetags/community_tags.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def __init__(self, user, var_name):
1616

1717
def render(self, context):
1818
user = self.user.resolve(context)
19-
if not user or not user.is_authenticated():
19+
if not (user and hasattr(user, "is_authenticated") and user.is_authenticated() ):
2020
return ''
2121
lists = {'personal': CommunityList.objects.get_or_create(user=user)[0]}
2222
try:

0 commit comments

Comments
 (0)