Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-vari committed Jun 28, 2024
2 parents 5cc17ca + 8166f16 commit e5a27cd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/web/templatetags/cookie.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

@register.simple_tag(takes_context=True)
def get_cookie(context, cookie_name):
request = context["request"]
result = request.COOKIES.get(cookie_name, '')
return result
request = context.get("request")
if request:
return request.COOKIES.get(cookie_name, "")
return ""

0 comments on commit e5a27cd

Please sign in to comment.