From ff8453e00300e97db53beea21632407e541e204f Mon Sep 17 00:00:00 2001 From: Sam Date: Wed, 3 Mar 2021 10:49:44 +0000 Subject: [PATCH] readme update --- README.md | 3 +-- products/views.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4cb9249..c7546df 100644 --- a/README.md +++ b/README.md @@ -273,8 +273,7 @@ For massive load of product data. CSV headers: `sku,nombre-producto,descripcion,imagen,url,precio,gastos-envio,cond-envio,descuento,stock,tags,categoria,identificadores` -Only admin users have access to endoint - +Number fields must not include other symbols (like currency) ## GeoIP Setup diff --git a/products/views.py b/products/views.py index a1b2177..c3be963 100644 --- a/products/views.py +++ b/products/views.py @@ -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()