Skip to content

Commit

Permalink
Merge pull request #3466 from unicef/hotfix_amendments
Browse files Browse the repository at this point in the history
move closed interventions w amendments to active
  • Loading branch information
robertavram authored Mar 29, 2023
2 parents 0ca54ad + 7651a37 commit a4646d7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/etools/applications/partners/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -2864,6 +2864,11 @@ def merge_amendment(self):
self.is_active = False
self.save()

# TODO: Technical debt - remove after tempoorary exception for ended amendments is removed.
if self.intervention.status == self.intervention.ENDED:
if self.intervention.end >= datetime.date.today() >= self.intervention.start:
self.intervention.status = self.intervention.ACTIVE

self.intervention.save(amendment_number=self.intervention.amendments.filter(is_active=False).count())

amended_intervention.delete()
Expand Down

0 comments on commit a4646d7

Please sign in to comment.