From df1dee65cb689351f78f730966b7d741ffc37079 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 15 Apr 2024 09:43:19 -0600 Subject: [PATCH] Fix bug --- src/registrar/admin.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 25ac8a9d6..b7c8ddef6 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1664,8 +1664,9 @@ class DomainAdmin(ListHeaderAdmin): if object_id is not None: domain = Domain.objects.get(pk=object_id) - # Use in the custom contact view - extra_context["original_object"] = domain.domain_info + # Used in the custom contact view + if domain is not None and hasattr(domain, "domain_info"): + extra_context["original_object"] = domain.domain_info # Pass in what the an extended expiration date would be for the expiration date modal years_to_extend_by = self._get_calculated_years_for_exp_date(domain)