Skip to content

Commit

Permalink
Update: declining a reissue does not remove the original approval or …
Browse files Browse the repository at this point in the history
…its stickers, it just resets the application to what it was before reissue (approved)
  • Loading branch information
awf-dbca committed Jan 24, 2025
1 parent 682c7f3 commit f34da8c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions mooringlicensing/components/proposals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down

0 comments on commit f34da8c

Please sign in to comment.