Skip to content

Commit

Permalink
users/userindicator: only pass request if in context (needed if csrf …
Browse files Browse the repository at this point in the history
…fails)
  • Loading branch information
fuzzylogic2000 committed Feb 25, 2022
1 parent da242db commit ea769a8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion meinberlin/apps/users/templatetags/userindicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,6 @@ def get_next_url(request):

@register.inclusion_tag('meinberlin_users/indicator.html', takes_context=True)
def userindicator(context):
context['redirect_field_value'] = get_next_url(context['request'])
if hasattr(context, 'request'):
context['redirect_field_value'] = get_next_url(context['request'])
return context

0 comments on commit ea769a8

Please sign in to comment.