From 3a253f3874988b253997907a3ad7ce606adffa52 Mon Sep 17 00:00:00 2001 From: Gabriel Detraz Date: Wed, 28 Mar 2018 18:04:25 +0200 Subject: [PATCH] Adapte history pour le acl_mixin --- re2o/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/re2o/views.py b/re2o/views.py index 9a987e5a..5e6e67d1 100644 --- a/re2o/views.py +++ b/re2o/views.py @@ -128,8 +128,10 @@ def history(request, application, object_name, object_id): model = HISTORY_BIND[application][object_name] except KeyError as e: raise Http404(u"Il n'existe pas d'historique pour ce modèle.") + object_name_id = object_name + 'id' + kwargs = {object_name_id: object_id} try: - instance = model.get_instance(object_id) + instance = model.get_instance(**kwargs) except model.DoesNotExist: messages.error(request, u"Entrée inexistante") return redirect(reverse('users:profil',