Skip to content

Commit

Permalink
Make sure we escape single quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
mdragon committed Nov 26, 2024
1 parent 2bd43c0 commit f77fffe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/tests/src/data_migration/test_copy_oracle_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def convert_value_for_insert(value) -> str:
if isinstance(value, int):
return str(value)
if isinstance(value, str):
return f"'{value}'" # noqa: B907
return f"'{value.replace("'", "''")}'" # noqa: B907
if isinstance(value, date):
return f"'{value.isoformat()}'" # noqa: B907

Expand Down

0 comments on commit f77fffe

Please sign in to comment.