Fixed csv import error.
This commit is contained in:
parent
d5435c71cf
commit
0ce6627756
@ -582,7 +582,7 @@ def application_import(request):
|
|||||||
applications_modified = 0
|
applications_modified = 0
|
||||||
with transaction.commit_on_success():
|
with transaction.commit_on_success():
|
||||||
dialect = csv.Sniffer().sniff(request.FILES['csvfile'].readline())
|
dialect = csv.Sniffer().sniff(request.FILES['csvfile'].readline())
|
||||||
dialect = utils.csv_ext.patchup(dialect)
|
dialect = csv_ext.patchup(dialect)
|
||||||
request.FILES['csvfile'].seek(0)
|
request.FILES['csvfile'].seek(0)
|
||||||
for (lno, line) in enumerate(csv.reader(request.FILES['csvfile'], dialect=dialect)):
|
for (lno, line) in enumerate(csv.reader(request.FILES['csvfile'], dialect=dialect)):
|
||||||
# basic input verification
|
# basic input verification
|
||||||
|
Loading…
Reference in New Issue
Block a user