Skip to content

Commit

Permalink
Merge pull request #238 from RSE-Sheffield/patch/fix-commitment-total
Browse files Browse the repository at this point in the history
Fix commitment total percentages
  • Loading branch information
twinkarma authored Oct 16, 2024
2 parents ef110f5 + 06a1fb9 commit 4cc8510
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rse/views/rses.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@ def commitment(request: HttpRequest) -> HttpResponse:

stacked_commitment_data = []
rse_allocations = {}
num_allocations = 1 if len(rse_allocations) < 1 else len(rse_allocations)


for a in allocation_unique_rses:
r_a = allocations.filter(rse__id=a['rse'])
rse = RSE.objects.get(id=a['rse'])
rse_allocations[rse] = r_a
stacked_commitment_data.append((rse, RSEAllocation.stacked_commitment_summary(r_a, from_date, until_date)))

num_allocations = 1 if len(rse_allocations) < 1 else len(rse_allocations)
stacked_commitment_summary = RSEAllocation.stacked_commitment_summary(rse_allocations.values(),
from_date,
until_date,
Expand Down

0 comments on commit 4cc8510

Please sign in to comment.