mirror of
https://gitlab2.federez.net/re2o/re2o
synced 2024-12-28 18:03:45 +00:00
Adapte history pour le acl_mixin
This commit is contained in:
parent
14991bf88e
commit
3a253f3874
1 changed files with 3 additions and 1 deletions
|
@ -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',
|
||||
|
|
Loading…
Reference in a new issue