Fix missing .strip

This commit is contained in:
Per von Zweigbergk 2023-09-05 10:39:52 +02:00
parent 369fe57ba0
commit 236c178f99

View File

@ -104,7 +104,7 @@ class BulkImportForm(BootstrapMixin, SyncedDataMixin, forms.Form):
Clean CSV-formatted data. The first row will be treated as column headers. Clean CSV-formatted data. The first row will be treated as column headers.
""" """
# Strip spaces and newlines only, leave tabs alone because they are significant in TSV mode # Strip spaces and newlines only, leave tabs alone because they are significant in TSV mode
stream = StringIO(data(' \n')) stream = StringIO(data.strip(' \n'))
reader = csv.reader(stream, **csv_reader_kwargs) reader = csv.reader(stream, **csv_reader_kwargs)
headers, records = parse_csv(reader) headers, records = parse_csv(reader)