Skip to content

Commit

Permalink
Update dbca_middleware.py
Browse files Browse the repository at this point in the history
  • Loading branch information
idabblewith committed Jul 26, 2024
1 parent 50ead53 commit 4e1ec0c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions config/dbca_middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from django.db import transaction
from rest_framework.exceptions import ParseError
from django.conf import settings
from django.middleware.csrf import get_token

from users.models import UserProfile, UserWork
from rest_framework.response import Response
Expand Down Expand Up @@ -270,6 +271,8 @@ def process_request(self, request):

# Log the user in.
login(request, user)
# Ensure CSRF token is set
get_token(request)
return http.HttpResponseRedirect(settings.SITE_URL)

# # Synchronize the user groups
Expand Down

0 comments on commit 4e1ec0c

Please sign in to comment.