Skip to content

Commit

Permalink
Ensure we only modify latest on the latest GrantCLRCalculation
Browse files Browse the repository at this point in the history
  • Loading branch information
gdixon committed Sep 6, 2021
1 parent 5dd9124 commit 7070b51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/grants/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ def grants(self):


def record_clr_prediction_curve(self, grant, clr_prediction_curve):
for obj in self.clr_calculations.filter(grant=grant):
for obj in self.clr_calculations.filter(grant=grant, latest=True):
obj.latest = False
obj.save()

Expand Down

0 comments on commit 7070b51

Please sign in to comment.