Skip to content

Commit

Permalink
Fix: Summary Null Check (#2875)
Browse files Browse the repository at this point in the history
* fix: updated org service calculation for max credit offset to account for credit earning order over time

* fix: pending deductions calc change

* fix: None check on summary obj

---------

Co-authored-by: Your Name <you@example.com>
  • Loading branch information
AlexZorkin and Your Name committed Apr 19, 2024
1 parent 8c8b5db commit 7c210f3
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/api/services/OrganizationService.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,11 @@ def get_pending_deductions(
if compliance_report.summary.credits_offset is not None:
deductions += compliance_report.summary.credits_offset

if report.status.director_status_id == 'Accepted' and \
ignore_pending_supplemental:
deductions -= report.summary.credits_offset
if report.status.director_status_id == 'Accepted' and ignore_pending_supplemental:
if report.summary is not None:
if report.summary.credits_offset:
deductions -= report.summary.credits_offset

if deductions < 0:
deductions = 0

Expand Down

0 comments on commit 7c210f3

Please sign in to comment.