mirror of
https://github.com/jazzband/django-axes.git
synced 2026-03-16 22:30:23 +00:00
Reversion update: handle case when view doesn't have name
This commit is contained in:
parent
dfaf67810a
commit
06e00d08f1
1 changed files with 2 additions and 1 deletions
|
|
@ -266,7 +266,8 @@ a workaround with a monkeypatch function that functions correctly.
|
|||
from reversion import views
|
||||
|
||||
def _request_creates_revision(request):
|
||||
if resolve(request.path_info).url_name.endswith("login"):
|
||||
view_name = resolve(request.path_info).url_name
|
||||
if view_name and view_name.endswith('login'):
|
||||
return False
|
||||
|
||||
return request.method not in ["OPTIONS", "GET", "HEAD"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue