Skip to content

Commit

Permalink
Make sure all PUP records are cleared out when recalculating so that …
Browse files Browse the repository at this point in the history
…old messages don't stick around

Update ifxbilling to use request.data instead of request.body in update user accounts view; JQuery-based ajax seems
to have accessed the body already, so it can't be reaccessed
  • Loading branch information
aaronk committed Aug 29, 2024
1 parent 921f461 commit 65ac36d
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion coldfront/plugins/ifx/calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def generate_billing_records_for_organization(self, year, month, organization, r
'''
successes = []
errors = []

if organization.org_tree == 'Harvard':
projects = [po.project for po in organization.projectorganization_set.all()]
if not projects:
Expand Down
1 change: 1 addition & 0 deletions coldfront/plugins/ifx/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ def calculate_billing_month(request, year, month):
try:
if recalculate:
ifxbilling_models.BillingRecord.objects.filter(year=year, month=month).delete()
ifxbilling_models.ProductUsageProcessing.objects.filter(product_usage__year=year, product_usage__month=month).delete()
calculator = NewColdfrontBillingCalculator()
calculator.calculate_billing_month(year, month, recalculate=recalculate)
return Response('OK', status=status.HTTP_200_OK)
Expand Down
2 changes: 1 addition & 1 deletion ifxbilling

0 comments on commit 65ac36d

Please sign in to comment.