diff --git a/src/registrar/admin.py b/src/registrar/admin.py index cdd8611f0..0ab6c3022 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1159,7 +1159,14 @@ class DomainAdmin(ListHeaderAdmin): if object_id is not None: domain = Domain.objects.get(pk=object_id) years_to_extend_by = self._get_calculated_years_for_exp_date(domain) - curr_exp_date = domain.registry_expiration_date + + try: + curr_exp_date = domain.registry_expiration_date + except KeyError: + # No expiration date was found. Return none. + extra_context["extended_expiration_date"] = None + return super().changeform_view(request, object_id, form_url, extra_context) + if curr_exp_date < date.today(): extra_context["extended_expiration_date"] = date.today() + relativedelta(years=years_to_extend_by) else: