From 68dc0e08ad5b2a330d946b863c80248b78b38b66 Mon Sep 17 00:00:00 2001 From: Isaac To Date: Mon, 25 Mar 2024 13:30:55 -0700 Subject: [PATCH] Remove conflation of `None` and `''` query in web UI Without this conflation, the behavior of handling empty string query args can be made more consistent across the app more easily. A proper message will be generated to the user if they bypass the frontend to submit an empty query string. --- datalad_registry/overview.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/datalad_registry/overview.py b/datalad_registry/overview.py index 1ecfd369..f8c5915f 100644 --- a/datalad_registry/overview.py +++ b/datalad_registry/overview.py @@ -39,7 +39,7 @@ def overview(): # No type hints due to mypy#7187. # as we would add search to individual files. query = request.args.get("query", None, type=str) search_error = None - if query: + if query is not None: lgr.debug("Search by '%s'", query) try: criteria = parse_query(query)