Skip to content

Commit

Permalink
#4326 bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sambodeme committed Oct 8, 2024
1 parent 11dda57 commit 6b9e4a7
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 8 deletions.
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_additional_eins.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ def extract_additional_eins(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_additional_ueis.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def extract_additional_ueis(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_audit_findings.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ def extract_audit_findings(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_audit_findings_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def extract_audit_findings_text(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_corrective_action_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def extract_corrective_action_plan(file, is_gsa_migration=False, auditee_uei=Non
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_federal_awards.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def extract_federal_awards(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_notes_to_sefa.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def extract_notes_to_sefa(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down
4 changes: 3 additions & 1 deletion backend/audit/intakelib/mapping_secondary_auditors.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ def extract_secondary_auditors(file, is_gsa_migration=False, auditee_uei=None):
template["title_row"],
)

_, file_extension = os.path.splitext(file)
_, file_extension = (
os.path.splitext(file.name) if hasattr(file, "name") else os.path.splitext(file)
)
if file_extension == ".xlsx":
ir = extract_workbook_as_ir(file)
elif file_extension == ".json":
Expand Down

0 comments on commit 6b9e4a7

Please sign in to comment.