Skip to content

Commit

Permalink
Debug logging
Browse files Browse the repository at this point in the history
  • Loading branch information
janbaykara authored Jul 15, 2022
1 parent f3e9128 commit 9e48ea5
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app/templatetags/setting.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ def oauth_application_from_query(takes_context=True):
try:
request = context["request"]
next = request.GET.get('next', None)
if next:
client_id = urllib.parse.urlparse(next).query.get('client_id', None)
if client_id:
if next is not None:
print("next", next)
next_url_parts = urllib.parse.urlparse(next)
print("next_url_parts", next_url_parts)
print("next_url_parts.query", next_url_parts.query)
client_id = next_url_parts.query.get('client_id', None)
if client_id is not None:
app = OAuthApp.filter(client_id=client_id).first()
return app
except:
Expand Down

0 comments on commit 9e48ea5

Please sign in to comment.