From 5952426c614b3b32822475f6d7643a5ce9c2cf43 Mon Sep 17 00:00:00 2001 From: Sakari Ikonen <64256562+saikonen@users.noreply.github.com> Date: Wed, 7 Feb 2024 21:21:10 +0200 Subject: [PATCH] make search changes backwards compatible (#414) --- services/ui_backend_service/api/search.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/ui_backend_service/api/search.py b/services/ui_backend_service/api/search.py index 045f3d11..e57c53c1 100644 --- a/services/ui_backend_service/api/search.py +++ b/services/ui_backend_service/api/search.py @@ -20,6 +20,10 @@ class SearchApi(object): def __init__(self, app, db, cache=None): self.db = db + # Old search route kept for backwards compatibility + app.router.add_route( + "GET", "/flows/{flow_id}/runs/{run_number}/search", self.get_run_tasks + ) app.router.add_route( "GET", "/search/flows/{flow_id}/runs/{run_number}", self.get_run_tasks ) @@ -32,7 +36,7 @@ def __init__(self, app, db, cache=None): @handle_exceptions async def get_run_tasks(self, request): - scope_list = _decode_url_param_value(request.query.get('scope', '')).split(',') + scope_list = _decode_url_param_value(request.query.get('scope', SCOPE_ARTIFACT)).split(',') ws = web.WebSocketResponse() await ws.prepare(request)