Commit 7d13b424 authored by Kirill's avatar Kirill Committed by Белоус Кирилл Сергеевич
Browse files

fix uploaded file type for csv_import handler

parent 0dcee331
......@@ -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