Skip to content

Commit

Permalink
Update: can no longer start a reissue if another proposal for the sam…
Browse files Browse the repository at this point in the history
…e approval exists
  • Loading branch information
awf-dbca committed Jan 24, 2025
1 parent 58f8c8c commit a5819a0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mooringlicensing/components/approvals/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,18 @@ def can_external_action(self):

@property
def can_reissue(self):

#check if there are any active amendment/renewal/swap applications
if Proposal.objects.filter(previous_application=self.current_proposal).exclude(
processing_status__in=[
Proposal.PROCESSING_STATUS_APPROVED,
Proposal.PROCESSING_STATUS_DECLINED,
Proposal.PROCESSING_STATUS_DISCARDED,
Proposal.PROCESSING_STATUS_EXPIRED,
]
).exists():
return False

return self.status == Approval.APPROVAL_STATUS_CURRENT or self.status == Approval.APPROVAL_STATUS_SUSPENDED

@property
Expand Down

0 comments on commit a5819a0

Please sign in to comment.