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)