Revert "re-id created objects in changeset view"
This reverts commit 74c120be192b031f7aa4922ac039c7b2eb166a3f.
This commit is contained in:
parent
e738896588
commit
d9e1834154
1 changed files with 1 additions and 11 deletions
|
@ -357,8 +357,6 @@ def changeset_detail(request, pk):
|
|||
model_objects[pk].titles = {}
|
||||
objects[model] = model_objects
|
||||
|
||||
created_obj_ids = {}
|
||||
|
||||
grouped_changes = []
|
||||
changes = []
|
||||
last_obj = None
|
||||
|
@ -376,17 +374,9 @@ def changeset_detail(request, pk):
|
|||
|
||||
if obj != last_obj:
|
||||
changes = []
|
||||
if is_created_pk(pk):
|
||||
if pk not in created_obj_ids:
|
||||
created_obj_ids[pk] = len(created_obj_ids)+1
|
||||
obj_desc = _('Created %(model)s #%(id)s') % {'model': obj.__class__._meta.verbose_name,
|
||||
'id': created_obj_ids[pk]}
|
||||
else:
|
||||
obj_desc = _('%(model)s #%(id)s') % {'model': obj.__class__._meta.verbose_name, 'id': pk}
|
||||
|
||||
grouped_changes.append({
|
||||
'model': obj.__class__,
|
||||
'obj': obj_desc,
|
||||
'obj': _('%(model)s #%(id)s') % {'model': obj.__class__._meta.verbose_name, 'id': pk},
|
||||
'obj_title': obj.title if obj.titles else None,
|
||||
'changes': changes,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue