From bae790ccc7761124b601b6e8e0eb2ce3cc5f8139 Mon Sep 17 00:00:00 2001 From: Seth Ladygo Date: Tue, 14 May 2019 16:10:14 -0700 Subject: [PATCH] fix product fetch view --- products/views.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/products/views.py b/products/views.py index a12c420..3feef33 100644 --- a/products/views.py +++ b/products/views.py @@ -23,7 +23,7 @@ def search_products(request): if not body or len(body) < 1: return HttpResponse('Bad request: no data', status=400) - data = json.loads(body.decode('utf-8')) + text = body.decode('utf-8') # TODO enable someday, when product data includes them # season_id = data.get('season') @@ -40,7 +40,6 @@ def search_products(request): # if not region: # return HttpResponse('Bad request: no region found', status=400) - text = data.get('text') ids = Product.find_sap_ids(text) log.info('found ids %s in %s', ids, text)