Skip to content

Commit b9abd54

Browse files
author
Florian Perucki
committed
Filter search using regex only when '*' is detected
1 parent ce39df8 commit b9abd54

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

mrq/dashboard/app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ def build_api_datatables_query(req):
128128

129129
for param in ["queue", "path", "exceptiontype"]:
130130
if req.args.get(param):
131-
query[param] = re.compile("^"+req.args.get(param)+"$")
131+
if "*" in req.args.get(param):
132+
query[param] = re.compile("^"+req.args.get(param)+"$")
133+
else:
134+
query[param] = req.args.get(param)
135+
132136
if req.args.get("status"):
133137
statuses = req.args["status"].split("-")
134138
if len(statuses) == 1:

0 commit comments

Comments
 (0)