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,15 +258,13 @@ def changeset_detail(request, pk):
'problem': _("can't create this object") if obj_problems.cant_create else None, 'problem': _("can't create this object") if obj_problems.cant_create else None,
}) })
else: else:
if obj_problems.obj_does_not_exist:
changes.append({ changes.append({
'icon': 'warning-sign', 'icon': 'warning-sign',
'class': 'danger', 'class': 'danger',
'empty': True, 'empty': True,
'title': _('no longer exists'), 'title': _('no longer exists'),
'problem': ( 'problem': _("can't update this object because it no longer exists"),
_("can't update this object because it no longer exists")
if obj_problems.obj_does_not_exist else None
),
}) })
# todo: make it possible for the user to get rid of this # todo: make it possible for the user to get rid of this