Skip to content

Commit 990be7f

Browse files
Merge pull request #185 from OpenUpSA/tsv-to-json-fix
fix: normalize line endings in tsv_to_json function
2 parents c655bc0 + a99c1a8 commit 990be7f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

helpers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,8 @@ def check_user_id(data, param_id):
446446

447447
def tsv_to_json(tsv_string, project_id):
448448
import re
449+
450+
tsv_string = tsv_string.replace('\r\n', '\n').replace('\r', '\n')
449451

450452
with get_db_cursor() as cursor:
451453
cursor.execute(

0 commit comments

Comments
 (0)