feat(chalice): limit exp-search to 7 events for then-events

This commit is contained in:
Taha Yassine Kraiem 2023-02-15 16:51:38 +01:00
parent a767b6f265
commit e5ce58438e

View file

@ -1176,6 +1176,9 @@ def search_query_parts_ch(data: schemas.SessionsSearchPayloadSchema, error_statu
) {"" if or_events else (f"AS event_{event_index} " + ("ON(TRUE)" if event_index > 0 else ""))}\
""")
event_index += 1
# limit THEN-events to 7 in CH because sequenceMatch cannot take more arguments
if event_index == 7 and data.events_order == schemas.SearchEventOrder._then:
break
if event_index < 2:
data.events_order = schemas.SearchEventOrder._or