mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-24 08:25:17 -06:00
adds sane delimiters for dialect detection #13239
This commit is contained in:
parent
e782077bb7
commit
e465a758f0
@ -95,7 +95,7 @@ class BulkImportForm(BootstrapMixin, SyncedDataMixin, forms.Form):
|
|||||||
try:
|
try:
|
||||||
# This uses a rough heuristic to detect the CSV dialect. If the data is malformed, we'll fall back to
|
# This uses a rough heuristic to detect the CSV dialect. If the data is malformed, we'll fall back to
|
||||||
# the default Excel dialect.
|
# the default Excel dialect.
|
||||||
dialect = csv.Sniffer().sniff(data.strip())
|
dialect = csv.Sniffer().sniff(data.strip(), delimiters=',; ')
|
||||||
except csv.Error:
|
except csv.Error:
|
||||||
dialect = csv.excel
|
dialect = csv.excel
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user