Skip to content

Commit

Permalink
fix: null credit offset on no schedule b fix (#2910)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexZorkin authored Oct 7, 2024
1 parent a17b54e commit 0496495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions backend/api/serializers/ComplianceReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1093,9 +1093,9 @@ def create(self, validated_data):

while current is not None:
if current.status.director_status_id == 'Accepted' and current.summary:
if current.summary.credits_offset > 0:
if current.summary.credits_offset is not None and current.summary.credits_offset > 0:
total_accepted_reductions += current.summary.credits_offset
elif current.summary.credits_offset_b > 0:
elif current.summary.credits_offset_b is not None and current.summary.credits_offset_b > 0:
total_accepted_reductions += current.summary.credits_offset_b
current = current.supplements

Expand Down

0 comments on commit 0496495

Please sign in to comment.