fix(chalice): assist autocomplete

This commit is contained in:
Taha Yassine Kraiem 2023-10-03 14:11:45 +02:00
parent 44b2838ed7
commit d71e0109df

View file

@ -42,7 +42,8 @@ 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 if type is not None else None)
return assist.autocomplete(project_id=projectId, q=q,
key=key if key is not None else type.value if type is not None else None)
if type in [schemas.FetchFilterType._url]:
type = schemas.EventType.request
elif type in [schemas.GraphqlFilterType._name]: