Skip to content

fix: call validate_import_csv_rows in parse_export_format#831

Open
PRAteek-singHWY wants to merge 1 commit intoOWASP:mainfrom
PRAteek-singHWY:fix/bug-hunt-01
Open

fix: call validate_import_csv_rows in parse_export_format#831
PRAteek-singHWY wants to merge 1 commit intoOWASP:mainfrom
PRAteek-singHWY:fix/bug-hunt-01

Conversation

@PRAteek-singHWY
Copy link
Copy Markdown
Contributor

Summary

Fixes a runtime regression in CSV import parsing.

parse_export_format() currently calls validate_export_csv_rows(...), but the validator defined in spreadsheet_parsers.py is validate_import_csv_rows(...).
This causes:

NameError: name 'validate_export_csv_rows' is not defined

Context

This validation flow was already introduced during the MyOpenCRE work, where CSV import validation logic was moved into spreadsheet_parsers.py via validate_import_csv_rows (see discussion in #584 comment and related work in #682 / #683).

This PR is a focused follow-up to restore that intended path on latest main.

Change

  • Updated one line in application/utils/spreadsheet_parsers.py:
    • validate_export_csv_rows(lfile) -> validate_import_csv_rows(lfile)

Validation

  • Ran:
    • ./venv/bin/python -m pytest application/tests/spreadsheet_parsers_test.py -q
  • Result:
    • 2 passed

Scope

  • Minimal, single-line regression fix
  • No behavior changes beyond restoring the existing import validation function call

@PRAteek-singHWY
Copy link
Copy Markdown
Contributor Author

PRAteek-singHWY commented Mar 27, 2026

Hi @northdpole @Pa04rth
This is a one-line regression fix, so I opened a direct PR instead of raising a separate issue to avoid extra triage overhead.

Context: I previously worked on the CSV import validation path during MyOpenCRE (validate_import_csv_rows), so I recognized this call-site mismatch quickly. Related discussion: #584 (comment), #682, #683.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant