mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-20 03:19:24 +02:00
Update admin.py
This commit is contained in:
parent
7d8cd5498b
commit
a4f51c6477
1 changed files with 3 additions and 4 deletions
|
@ -1203,11 +1203,10 @@ class DomainApplicationAdmin(ListHeaderAdmin):
|
||||||
should_proceed = False
|
should_proceed = False
|
||||||
return should_proceed
|
return should_proceed
|
||||||
|
|
||||||
original_is_approved_and_current_is_not = (
|
application_is_not_approved = (
|
||||||
original_obj.status == models.DomainApplication.ApplicationStatus.APPROVED,
|
obj.status != models.DomainApplication.ApplicationStatus.APPROVED
|
||||||
obj.status != models.DomainApplication.ApplicationStatus.APPROVED,
|
|
||||||
)
|
)
|
||||||
if original_is_approved_and_current_is_not and not obj.domain_is_not_active():
|
if application_is_not_approved and not obj.domain_is_not_active():
|
||||||
# If an admin tried to set an approved application to
|
# If an admin tried to set an approved application to
|
||||||
# another status and the related domain is already
|
# another status and the related domain is already
|
||||||
# active, shortcut the action and throw a friendly
|
# active, shortcut the action and throw a friendly
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue