Commit 2cd006aa authored by Andrey Vertiprahov's avatar Andrey Vertiprahov
Browse files

Merge branch 'fix-csv-import' into 'master'

fix csv_import view

See merge request !4516

(cherry picked from commit e30fa683)

7d13b424 fix uploaded file type for csv_import handler
parent 2666af94
Pipeline #27902 passed with stages
in 24 minutes and 43 seconds
......@@ -127,13 +127,13 @@ class CSVApplication(Application):
"\n".join(forbidden_ip),
)
else:
new_csv_file = request.FILES["file"]
new_csv_file = StringIO(request.FILES["file"].read().decode())
check_msg = ""
return new_csv_file, check_msg
if form.is_valid():
if request.user.is_superuser:
csv_file = request.FILES["file"]
csv_file = StringIO(request.FILES["file"].read().decode())
resp_msg = ""
else:
csv_file, resp_msg = import_check_perms()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment