Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Jan 31, 2025
1 parent a4e0df8 commit bf4797a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kolibri/core/auth/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1049,11 +1049,11 @@ def get_session_response(self, request):
try:
visitor_id = request.COOKIES.get("visitor_id")
if visitor_id:
UUID(visitor_id, version=4)
UUID(visitor_id, version=4)
else:
raise ValueError
raise ValueError
except (ValueError, TypeError):
visitor_id = uuid4().hex
visitor_id = uuid4().hex
response.set_cookie("visitor_id", visitor_id, expires=visitor_cookie_expiry)
return response
# Set last activity on session to the current time to prevent session timeout
Expand Down

0 comments on commit bf4797a

Please sign in to comment.