fix product fetch view

This commit is contained in:
Seth Ladygo
2019-05-14 16:10:14 -07:00
parent 01f98f7b41
commit bae790ccc7

View File

@ -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)