don't show "no longer exists" when that's not the case

This commit is contained in:
Laura Klünder 2024-12-02 11:07:01 +01:00
parent eaffd55718
commit 53c2d5178e

View file

@ -258,16 +258,14 @@ def changeset_detail(request, pk):
'problem': _("can't create this object") if obj_problems.cant_create else None,
})
else:
changes.append({
'icon': 'warning-sign',
'class': 'danger',
'empty': True,
'title': _('no longer exists'),
'problem': (
_("can't update this object because it no longer exists")
if obj_problems.obj_does_not_exist else None
),
})
if obj_problems.obj_does_not_exist:
changes.append({
'icon': 'warning-sign',
'class': 'danger',
'empty': True,
'title': _('no longer exists'),
'problem': _("can't update this object because it no longer exists"),
})
# todo: make it possible for the user to get rid of this
update_changes = []