From 9d925c4b17a0bf6ed3ff892b7286215a301bb54c Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Thu, 23 Apr 2020 16:35:22 +0000 Subject: [PATCH] Fix backward compatibility for logs view --- logs/urls.py | 10 +++++----- logs/views.py | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/logs/urls.py b/logs/urls.py index eefe6a70..914761bf 100644 --- a/logs/urls.py +++ b/logs/urls.py @@ -37,6 +37,11 @@ urlpatterns = [ views.revert_action, name="revert-action", ), + url( + r"(?P\w+)/(?P\w+)/(?P[0-9]+)$", + views.history, + name="history", + ), url( r"(?P\w+)/(?P[0-9]+)$", views.detailed_history, @@ -46,10 +51,5 @@ urlpatterns = [ url(r"^stats_models/$", views.stats_models, name="stats-models"), url(r"^stats_users/$", views.stats_users, name="stats-users"), url(r"^stats_actions/$", views.stats_actions, name="stats-actions"), - url( - r"(?P\w+)/(?P\w+)/(?P[0-9]+)$", - views.history, - name="history", - ), url(r"^stats_search_machine/$", views.stats_search_machine_history, name="stats-search-machine"), ] diff --git a/logs/views.py b/logs/views.py index 4c76158c..153bfb34 100644 --- a/logs/views.py +++ b/logs/views.py @@ -603,7 +603,7 @@ def history(request, application, object_name, object_id): except LookupError: raise Http404(_("No model found.")) - can_view, instance = get_history_object(get_history_object, model, object_name, object_id) + can_view, instance = get_history_object(request, model, object_name, object_id) if not can_view: return instance