From 7fa5f928c2fedc6582293488655e331775bc3dfd Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Thu, 30 Jun 2022 20:01:52 +0200 Subject: [PATCH] feat(api): assist global-autocomplete --- api/routers/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/routers/core.py b/api/routers/core.py index 81b1dabdb..24a2c3295 100644 --- a/api/routers/core.py +++ b/api/routers/core.py @@ -141,7 +141,7 @@ def events_search(projectId: int, q: str, if len(q) == 0: return {"data": []} if live: - return assist.autocomplete(project_id=projectId, q=q, key=type.value) + return assist.autocomplete(project_id=projectId, q=q, key=type.value if type is not None else None) if isinstance(type, str): return {"errors": ["Unsupported type"]} if type in [schemas.FetchFilterType._url]: