From 77edddb4413e908bef27ff12880f7cb6df1fafe8 Mon Sep 17 00:00:00 2001 From: Taha Yassine Kraiem Date: Wed, 4 Jun 2025 17:43:21 +0200 Subject: [PATCH] refactor(chalice): user auto_capture instead of is_property --- api/chalicelib/core/sessions/sessions_ch.py | 2 +- api/schemas/schemas.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/chalicelib/core/sessions/sessions_ch.py b/api/chalicelib/core/sessions/sessions_ch.py index 962af55af..f887e998b 100644 --- a/api/chalicelib/core/sessions/sessions_ch.py +++ b/api/chalicelib/core/sessions/sessions_ch.py @@ -430,7 +430,7 @@ def search_query_parts_ch(data: schemas.SessionsSearchPayloadSchema, error_statu is_not = False if sh.is_negation_operator(f.operator): is_not = True - if f.is_property: + if not f.auto_captured: cast = get_col_cast(data_type=f.data_type, value=f.value) if is_any: global_properties.append(f'isNotNull(e.properties.`{f.type}`)') diff --git a/api/schemas/schemas.py b/api/schemas/schemas.py index a69b4cf89..441cb0b6d 100644 --- a/api/schemas/schemas.py +++ b/api/schemas/schemas.py @@ -689,7 +689,7 @@ class SessionSearchFilterSchema(BaseModel): data_type: Optional[PropertyType] = Field(default=PropertyType.STRING.value) # used to tell if the current filter is predefined or user-property having the same name # used in case the user sends a property with the same name aas a predefined property - is_property: Optional[bool] = Field(default=False) + auto_captured: Optional[bool] = Field(default=True) _remove_duplicate_values = field_validator('value', mode='before')(remove_duplicate_values) _single_to_list_values = field_validator('value', mode='before')(single_to_list)