Skip to content

Commit

Permalink
fix(chalice): fixed Math-operators validation
Browse files Browse the repository at this point in the history
refactor(chalice): search for sessions that have events for heatmaps
  • Loading branch information
tahayk committed Jul 4, 2024
1 parent 42aa035 commit 30cd56c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions api/chalicelib/core/heatmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ def search_short_session(data: schemas.HeatMapSessionsSearch, project_id, user_i
value=[0],
operator=schemas.MathOperator._greater))

data.filters.append(schemas.SessionSearchFilterSchema(type=schemas.FilterType.events_count,
value=[0],
operator=schemas.MathOperator._greater))

full_args, query_part = sessions.search_query_parts(data=data, error_status=None, errors_only=False,
favorite_only=data.bookmarked, issue=None,
project_id=project_id, user_id=user_id)
Expand Down
8 changes: 8 additions & 0 deletions ee/api/chalicelib/core/heatmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,10 @@ def search_short_session(data: schemas.HeatMapSessionsSearch, project_id, user_i
value=[0],
operator=schemas.MathOperator._greater))

data.filters.append(schemas.SessionSearchFilterSchema(type=schemas.FilterType.events_count,
value=[0],
operator=schemas.MathOperator._greater))

full_args, query_part = sessions.search_query_parts(data=data, error_status=None, errors_only=False,
favorite_only=data.bookmarked, issue=None,
project_id=project_id, user_id=user_id)
Expand Down Expand Up @@ -318,6 +322,10 @@ def search_short_session(data: schemas.HeatMapSessionsSearch, project_id, user_i
value=[0],
operator=schemas.MathOperator._greater))

data.filters.append(schemas.SessionSearchFilterSchema(type=schemas.FilterType.events_count,
value=[0],
operator=schemas.MathOperator._greater))

full_args, query_part = sessions.search_query_parts_ch(data=data, error_status=None, errors_only=False,
favorite_only=data.bookmarked, issue=None,
project_id=project_id, user_id=user_id)
Expand Down

0 comments on commit 30cd56c

Please sign in to comment.