mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-07-23 19:20:47 +02:00
Merge pull request #1718 from cisagov/rjm/1674-approved-inreview-approved
Issue 1674: Add FSM rules for the new transitions from approv
This commit is contained in:
commit
5faa438956
4 changed files with 118 additions and 140 deletions
|
@ -884,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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue