gracefully fail on /search endpoint with no query

This commit is contained in:
Jeff 2020-09-26 15:07:59 -04:00
parent feb491cdda
commit a7cf7f8769
1 changed files with 1 additions and 1 deletions

View File

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