Skip to content

Commit 77b26b7

Browse files
committed
login: don't need to catch NoReverseMatch for login url
The app assumes this url is always included, if it wasn't the callback url would not be available and nothing would work So I don't neet to catch NoReverseMatch
1 parent 95760f4 commit 77b26b7

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

oauthadmin/views.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,7 @@ def login(request):
2525
# this view can be called directly by django admin site from
2626
# any url, or can be accessed by the login url if the urls
2727
# from this app were included
28-
try:
29-
login_url = reverse('oauthadmin.views.login')
30-
except NoReverseMatch:
31-
login_uri = None
32-
33-
if request.path == login_url:
28+
if request.path == reverse('oauthadmin.views.login'):
3429
# if this view is being accessed from login url look for 'next'
3530
# in query string to use as destination after the login is complete
3631
next = request.GET.get('next')

0 commit comments

Comments
 (0)