Commit 3a253f38 authored by Gabriel Detraz's avatar Gabriel Detraz Committed by chirac

Adapte history pour le acl_mixin

parent 14991bf8
......@@ -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}
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',
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment