readme update

This commit is contained in:
Sam
2021-03-03 10:49:44 +00:00
parent ddf7aee312
commit ff8453e003
2 changed files with 2 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ def load_coop_products(request):
csv_file = request.FILES['csv_file']
if csv_file.name.endswith('.csv') is not True:
logging.error(f"File {csv_file.name} is not a CSV file")
return Response({"errors":{"details": "File is not CSV type"}})
return Response({"errors":{"details": "File is not CSV type"}}, status=status.HTTP_406_NOT_ACCEPTABLE)
logging.info(f"Reading contents of {csv_file.name}")
decoded_file = csv_file.read().decode('utf-8').splitlines()