Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2025-02-28 | MAIN --> PROD | DEV (1b2c0a0) --> STAGING #4732

Merged
merged 1 commit into from
Feb 28, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions backend/audit/intakelib/mapping_additional_eins.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,11 @@ def extract_additional_eins(file, is_gsa_migration=False, auditee_uei=None):
return result


def additional_eins_audit_view(data):
eins = data.get("AdditionalEINs", {}).get("additional_eins_entries", [])
return {"additional_eins": [ein["additional_ein"] for ein in eins]} if eins else {}


def additional_eins_named_ranges(errors):
return _extract_named_ranges(
errors,
Expand Down
5 changes: 5 additions & 0 deletions backend/audit/intakelib/mapping_additional_ueis.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,11 @@ def extract_additional_ueis(file, is_gsa_migration=False, auditee_uei=None):
return result


def additional_ueis_audit_view(data):
ueis = data.get("AdditionalUEIs", {}).get("additional_ueis_entries", [])
return {"additional_ueis": [uei["additional_uei"] for uei in ueis]} if ueis else {}


def additional_ueis_named_ranges(errors):
return _extract_named_ranges(
errors,
Expand Down
7 changes: 7 additions & 0 deletions backend/audit/intakelib/mapping_audit_findings.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,13 @@ def extract_audit_findings(file, is_gsa_migration=False, auditee_uei=None):
return result


def findings_audit_view(data):
findings = data.get("FindingsUniformGuidance", {}).get(
"findings_uniform_guidance_entries", []
)
return {"findings_uniform_guidance": findings} if findings else {}


def audit_findings_named_ranges(errors):
return _extract_named_ranges(
errors,
Expand Down
5 changes: 5 additions & 0 deletions backend/audit/intakelib/mapping_audit_findings_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@ def extract_audit_findings_text(file, is_gsa_migration=False, auditee_uei=None):
return result


def audit_findings_text_audit_view(data):
findings_text = data.get("FindingsText", {}).get("findings_text_entries", [])
return {"findings_text": findings_text} if findings_text else {}


def audit_findings_text_named_ranges(errors):
return _extract_named_ranges(
errors,
Expand Down
7 changes: 7 additions & 0 deletions backend/audit/intakelib/mapping_corrective_action_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def extract_corrective_action_plan(file, is_gsa_migration=False, auditee_uei=Non
return result


def corrective_action_plan_audit_view(data):
caps = data.get("CorrectiveActionPlan", {}).get(
"corrective_action_plan_entries", []
)
return {"corrective_action_plan": caps} if caps else {}


def corrective_action_plan_named_ranges(errors):
return _extract_named_ranges(
errors,
Expand Down
8 changes: 8 additions & 0 deletions backend/audit/intakelib/mapping_federal_awards.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ def federal_awards_named_ranges(errors):
)


def federal_awards_audit_view(data):
awards = data.get("FederalAwards", {}).get("federal_awards", [])
total_expended = data.get("FederalAwards", {}).get("total_amount_expended", "")
return {
"federal_awards": {"awards": awards, "total_amount_expended": total_expended}
}


def _set_pass_through_entity_name(obj, target, value):
if value is None or value == "":
pass
Expand Down
7 changes: 7 additions & 0 deletions backend/audit/intakelib/mapping_notes_to_sefa.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ def extract_notes_to_sefa(file, is_gsa_migration=False, auditee_uei=None):
return result


def notes_to_sefa_audit_view(data):
updated = data.get("NotesToSefa", {})
# Removing auditee_uei because it's duplicated in general_information.
updated.pop("auditee_uei")
return {"notes_to_sefa": updated} if updated else {}


def notes_to_sefa_named_ranges(errors):
return _extract_named_ranges(
errors, notes_to_sefa_column_mapping, notes_to_sefa_field_mapping, meta_mapping
Expand Down
7 changes: 7 additions & 0 deletions backend/audit/intakelib/mapping_secondary_auditors.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ def extract_secondary_auditors(file, is_gsa_migration=False, auditee_uei=None):
return result


def secondary_auditors_audit_view(data):
secondary_auditors = data.get("SecondaryAuditors", {}).get(
"secondary_auditors_entries", []
)
return {"secondary_auditors": secondary_auditors} if secondary_auditors else {}


def secondary_auditors_named_ranges(errors):
return _extract_named_ranges(
errors,
Expand Down