diff --git a/netbox/utilities/forms/bulk_import.py b/netbox/utilities/forms/bulk_import.py index d89c8484d..933eea387 100644 --- a/netbox/utilities/forms/bulk_import.py +++ b/netbox/utilities/forms/bulk_import.py @@ -104,7 +104,7 @@ class BulkImportForm(BootstrapMixin, SyncedDataMixin, forms.Form): 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 - stream = StringIO(data(' \n')) + stream = StringIO(data.strip(' \n')) reader = csv.reader(stream, **csv_reader_kwargs) headers, records = parse_csv(reader)