mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-23 04:22:01 -06:00
* Strip whitespace from csv headers * Move strip() call to parse_csv() --------- Co-authored-by: jeremystretch <jstretch@netboxlabs.com>
This commit is contained in:
parent
a71a59c088
commit
e459c46dad
@ -195,6 +195,7 @@ def parse_csv(reader):
|
|||||||
# `site.slug` header, to indicate the related site is being referenced by its slug.
|
# `site.slug` header, to indicate the related site is being referenced by its slug.
|
||||||
|
|
||||||
for header in next(reader):
|
for header in next(reader):
|
||||||
|
header = header.strip()
|
||||||
if '.' in header:
|
if '.' in header:
|
||||||
field, to_field = header.split('.', 1)
|
field, to_field = header.split('.', 1)
|
||||||
headers[field] = to_field
|
headers[field] = to_field
|
||||||
|
Loading…
Reference in New Issue
Block a user