Skip to content

Commit

Permalink
Correcting PASSTHROUGHAWARD transformation tracking (#3822)
Browse files Browse the repository at this point in the history
* Tracking for all is_passthrough_award

* Comment

* Comment

* Comment
  • Loading branch information
phildominguez-gsa committed May 13, 2024
1 parent f473c09 commit 1b10b38
Showing 1 changed file with 15 additions and 11 deletions.
26 changes: 15 additions & 11 deletions backend/census_historical_migration/workbooklib/federal_awards.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,23 +256,27 @@ def xform_is_passthrough_award(audits):
is_empty_passthrough_found = False

for audit in audits:
if not string_to_string(audit.PASSTHROUGHAWARD):
award = string_to_string(audit.PASSTHROUGHAWARD)
if not award:
is_empty_passthrough_found = True

amount = string_to_string(audit.PASSTHROUGHAMOUNT)
if amount and amount != "0":
audit.PASSTHROUGHAWARD = "Y"
award = "Y"
else:
audit.PASSTHROUGHAWARD = "N"
award = "N"

track_transformations(
"PASSTHROUGHAWARD",
audit.PASSTHROUGHAWARD,
"is_passthrough_award",
award,
"xform_is_passthrough_award",
change_records,
)

audit.PASSTHROUGHAWARD = award

track_transformations(
"PASSTHROUGHAWARD",
"",
"is_passthrough_award",
audit.PASSTHROUGHAWARD,
"xform_is_passthrough_award",
change_records,
)
# See Transformation Method Change Recording at the top of this file.
if change_records and is_empty_passthrough_found:
InspectionRecord.append_federal_awards_changes(change_records)
Expand Down

0 comments on commit 1b10b38

Please sign in to comment.