Skip to content

Commit

Permalink
Break import loop
Browse files Browse the repository at this point in the history
Fixes #497
  • Loading branch information
michael-k authored and ad-m committed Apr 4, 2017
1 parent f292679 commit e88ab37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion guardian/utils.py
Expand Up @@ -9,7 +9,6 @@
from django.conf import settings
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.contrib.auth.models import AnonymousUser, Group
from django.contrib.auth.views import redirect_to_login
from django.core.exceptions import ObjectDoesNotExist, PermissionDenied
from django.db.models import Model
from django.http import HttpResponseForbidden, HttpResponseNotFound
Expand Down Expand Up @@ -122,6 +121,7 @@ def get_40x_or_None(request, perms, obj=None, login_url=None,
raise ObjectDoesNotExist
return HttpResponseNotFound()
else:
from django.contrib.auth.views import redirect_to_login
return redirect_to_login(request.get_full_path(),
login_url,
redirect_field_name)
Expand Down

0 comments on commit e88ab37

Please sign in to comment.