aboutsummaryrefslogtreecommitdiff
path: root/coupons_web.py
diff options
context:
space:
mode:
Diffstat (limited to 'coupons_web.py')
-rw-r--r--coupons_web.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/coupons_web.py b/coupons_web.py
index 16e89eb..bbd1177 100644
--- a/coupons_web.py
+++ b/coupons_web.py
@@ -55,7 +55,11 @@ def search(searchstring = ""):
a = coupons.fetch_and_search(store = store, force = force, searchstring = searchstring, date = date, config = config)
if len(a) > 2: # an empty a is "{}" which is a string?!
results.append({store: json.loads(a)})
- accept = request.headers.get("Accept")
+ accept = []
+ try:
+ accept = request.headers.get("Accept")
+ except:
+ pass
from_js = True if request.headers.get("From") else False
#print(f"DEBUG(web search): Accept only type {accept}")
#print(f"DEBUG(web search): Results: {results}")
bgstack15