summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff <jeff@i2p.rocks>2020-09-26 15:07:59 -0400
committerJeff <jeff@i2p.rocks>2020-09-26 15:07:59 -0400
commita7cf7f876965d9e3fb9ea77e93cff8a849563f98 (patch)
tree8b5029539affc32a8f762f027015124045242dd6
parentfeb491cdda5bfdf7b21b92fd6c06ee782c7eef81 (diff)
gracefully fail on /search endpoint with no query
-rw-r--r--observer.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/observer.py b/observer.py
index fe44558..11c9b61 100644
--- a/observer.py
+++ b/observer.py
@@ -535,7 +535,7 @@ def show_tx(txid, more_details=False):
def search():
lmq, lokid = lmq_connection()
info = FutureJSON(lmq, lokid, 'rpc.get_info', 1)
- val = flask.request.args.get('value').strip()
+ val = (flask.request.args.get('value') or '').strip()
if val and len(val) < 10 and val.isdigit(): # Block height
return show_block(val)