From f34da8c14db5b5680df54340652b685d3a406033 Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 24 Jan 2025 05:00:13 +0000 Subject: [PATCH] Update: declining a reissue does not remove the original approval or its stickers, it just resets the application to what it was before reissue (approved) --- mooringlicensing/components/proposals/models.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mooringlicensing/components/proposals/models.py b/mooringlicensing/components/proposals/models.py index 6345c0cf..80c72667 100644 --- a/mooringlicensing/components/proposals/models.py +++ b/mooringlicensing/components/proposals/models.py @@ -1468,6 +1468,13 @@ def final_decline(self, request, details): # For AuA or MLA, approver can final decline raise ValidationError('You cannot decline if it is not with approver') + if self.approval and self.approval.reissued: + #if the approval was reissued, revert the proposal to what it was before reissue + self.processing_status = Proposal.PROCESSING_STATUS_APPROVED + self.approval.reissued = False + self.save() + return + proposal_decline, success = ProposalDeclinedDetails.objects.update_or_create( proposal=self, defaults={