diff --git a/admin_confirm/admin.py b/admin_confirm/admin.py index 74ccaf1..3914c51 100644 --- a/admin_confirm/admin.py +++ b/admin_confirm/admin.py @@ -423,13 +423,12 @@ def _change_confirmation_view(self, request, object_id, form_url, extra_context) **self.admin_site.each_context(request), "preserved_filters": self.get_preserved_filters(request), "title": f"{_('Confirm')} {title_action} {opts.verbose_name}", - "subtitle": str(obj), - "object_name": str(obj), + "subtitle": obj and str(obj), + "object_name": obj and str(obj), "object_id": object_id, "app_label": opts.app_label, "model_name": opts.model_name, "opts": opts, - "obj": obj, "changed_data": changed_data, "add": add, "save_as_new": SAVE_AS_NEW in request.POST, diff --git a/admin_confirm/templates/admin/change_data.html b/admin_confirm/templates/admin/change_data.html index c9c3ebc..d781be8 100644 --- a/admin_confirm/templates/admin/change_data.html +++ b/admin_confirm/templates/admin/change_data.html @@ -9,7 +9,7 @@ {% for field, values in changed_data.items %}