8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-11-08 19:06:25 +00:00

Adapte history pour le acl_mixin

This commit is contained in:
Gabriel Detraz 2018-03-28 18:04:25 +02:00 committed by chirac
parent 14991bf88e
commit 3a253f3874

View file

@ -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',