Skip to content

Commit

Permalink
Merge branch 'remove_budget_calculation_on_request_form' of github.co…
Browse files Browse the repository at this point in the history
…m:comic/grand-challenge.org into remove_budget_calculation_on_request_form
  • Loading branch information
amickan committed Nov 15, 2024
2 parents b6bd452 + c9193d5 commit bfc3603
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/grandchallenge/challenges/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1278,14 +1278,14 @@ def total_compute_costs_euros(self):
self.phase_1_compute_costs_euros + self.phase_2_compute_costs_euros
)

def calculate_invoiced_amount(self, cost, ratio):
def calculate_invoiced_amount(self, *, cost, ratio):
if self.storage_and_compute_cost_surplus <= 0:
# Below minimum prize, add proportional shortfall
# Below minimum price, add proportional shortfall
return round(
cost + ratio * abs(self.storage_and_compute_cost_surplus)
)
else:
# Above minimum prize, allocate surplus proportionally
# Above minimum price, allocate surplus proportionally
return round(
ratio
* (
Expand Down

0 comments on commit bfc3603

Please sign in to comment.