From a4f51c6477bdfa9bf3bbd59d94dbe8d418dbde0f Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Tue, 27 Feb 2024 14:34:35 -0700 Subject: [PATCH] Update admin.py --- src/registrar/admin.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/registrar/admin.py b/src/registrar/admin.py index 68e9bc4bb..c440d0ea3 100644 --- a/src/registrar/admin.py +++ b/src/registrar/admin.py @@ -1203,11 +1203,10 @@ class DomainApplicationAdmin(ListHeaderAdmin): should_proceed = False return should_proceed - original_is_approved_and_current_is_not = ( - original_obj.status == models.DomainApplication.ApplicationStatus.APPROVED, - obj.status != models.DomainApplication.ApplicationStatus.APPROVED, + application_is_not_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 # another status and the related domain is already # active, shortcut the action and throw a friendly