Fixes #7780: Preserve mutli-line values during CSV file import

This commit is contained in:
jeremystretch 2021-11-09 15:24:21 -05:00
parent 82210cc116
commit d08ed9fe5f
2 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@
* [#7752](https://github.com/netbox-community/netbox/issues/7752) - Fix minimum version check under Python v3.10 * [#7752](https://github.com/netbox-community/netbox/issues/7752) - Fix minimum version check under Python v3.10
* [#7766](https://github.com/netbox-community/netbox/issues/7766) - Add missing outer dimension columns to rack table * [#7766](https://github.com/netbox-community/netbox/issues/7766) - Add missing outer dimension columns to rack table
* [#7780](https://github.com/netbox-community/netbox/issues/7780) - Preserve mutli-line values during CSV file import
* [#7783](https://github.com/netbox-community/netbox/issues/7783) - Fix indentation of locations under site view * [#7783](https://github.com/netbox-community/netbox/issues/7783) - Fix indentation of locations under site view
--- ---

View File

@ -224,7 +224,7 @@ class CSVFileField(forms.FileField):
return None return None
csv_str = file.read().decode('utf-8').strip() csv_str = file.read().decode('utf-8').strip()
reader = csv.reader(csv_str.splitlines()) reader = csv.reader(StringIO(csv_str))
headers, records = parse_csv(reader) headers, records = parse_csv(reader)
return headers, records return headers, records