From 079a5fda6d2670c4d31ebbd9c420708231c77100 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Tue, 29 Oct 2024 16:05:20 +0100 Subject: [PATCH] fix(chalice): heatmap support operators (#2706) (cherry picked from commit ca4c5688830619cdda69f50aa31a7189f6206a64) --- api/chalicelib/core/heatmaps.py | 2 +- ee/api/chalicelib/core/heatmaps.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/api/chalicelib/core/heatmaps.py b/api/chalicelib/core/heatmaps.py index 49371134c..47fe533b3 100644 --- a/api/chalicelib/core/heatmaps.py +++ b/api/chalicelib/core/heatmaps.py @@ -224,7 +224,7 @@ def search_short_session(data: schemas.HeatMapSessionsSearch, project_id, user_i break for f in data.events: if f.type == schemas.EventType.LOCATION: - location_condition = f + location_condition = f.model_copy() if len(f.value) == 0: f.operator = schemas.SearchEventOperator.IS_ANY elif f.type == schemas.EventType.CLICK: diff --git a/ee/api/chalicelib/core/heatmaps.py b/ee/api/chalicelib/core/heatmaps.py index f4435859c..96db568d0 100644 --- a/ee/api/chalicelib/core/heatmaps.py +++ b/ee/api/chalicelib/core/heatmaps.py @@ -239,7 +239,7 @@ if not config("EXP_SESSIONS_SEARCH", cast=bool, default=False): break for f in data.events: if f.type == schemas.EventType.LOCATION: - location_condition = f + location_condition = f.model_copy() if len(f.value) == 0: f.operator = schemas.SearchEventOperator.IS_ANY elif f.type == schemas.EventType.CLICK: @@ -437,7 +437,7 @@ else: break for f in data.events: if f.type == schemas.EventType.LOCATION: - location_condition = f + location_condition = f.model_copy() if len(f.value) == 0: f.operator = schemas.SearchEventOperator.IS_ANY elif f.type == schemas.EventType.CLICK: