Skip to content

Commit

Permalink
Redirection: Check for querystring and include it if there is one
Browse files Browse the repository at this point in the history
  • Loading branch information
helgihg authored and cyface committed Nov 23, 2018
1 parent 995c330 commit 9693a0b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions termsandconditions/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ def process_request(self, request):

if user_authenticated and is_path_protected(current_path):
for term in TermsAndConditions.get_active_terms_not_agreed_to(request.user):
# Check for querystring and include it if there is one
qs = request.META['QUERY_STRING']
current_path += '?' + qs if qs else ''
return redirect_to_terms_accept(current_path, term.slug)

return None
Expand Down

0 comments on commit 9693a0b

Please sign in to comment.