Merge branch 'main' into za/1602-extend-expirations-easily

This commit is contained in:
zandercymatics 2024-02-22 09:55:33 -07:00
commit ca43d91641
No known key found for this signature in database
GPG key ID: FF4636ABEC9682B7
68 changed files with 5306 additions and 4589 deletions

View file

@ -678,6 +678,7 @@ class DomainInformationAdmin(ListHeaderAdmin):
"type_of_work",
"more_organization_information",
"domain",
"domain_application",
"submitter",
"no_other_contacts_rationale",
"anything_else",
@ -739,7 +740,6 @@ class DomainApplicationAdminForm(forms.ModelForm):
class DomainApplicationAdmin(ListHeaderAdmin):
"""Custom domain applications admin class."""
class InvestigatorFilter(admin.SimpleListFilter):
@ -846,6 +846,7 @@ class DomainApplicationAdmin(ListHeaderAdmin):
"creator",
"about_your_organization",
"requested_domain",
"approved_domain",
"alternative_domains",
"purpose",
"submitter",
@ -883,14 +884,11 @@ class DomainApplicationAdmin(ListHeaderAdmin):
if (
obj
and original_obj.status == models.DomainApplication.ApplicationStatus.APPROVED
and (
obj.status == models.DomainApplication.ApplicationStatus.REJECTED
or obj.status == models.DomainApplication.ApplicationStatus.INELIGIBLE
)
and obj.status != models.DomainApplication.ApplicationStatus.APPROVED
and not obj.domain_is_not_active()
):
# If an admin tried to set an approved application to
# rejected or ineligible and the related domain is already
# another status and the related domain is already
# active, shortcut the action and throw a friendly
# error message. This action would still not go through
# shortcut or not as the rules are duplicated on the model,