fix(chalice): fixed empty bookmark/vault projects null-timestamp issue (#3142)
This commit is contained in:
parent
9eb19fedf1
commit
ae463db150
2 changed files with 14 additions and 1 deletions
|
|
@ -43,7 +43,13 @@ def search_sessions(data: schemas.SessionsSearchPayloadSchema, project: schemas.
|
|||
count_only=False, issue=None, ids_only=False, platform="web"):
|
||||
if data.bookmarked:
|
||||
data.startTimestamp, data.endTimestamp = sessions_favorite.get_start_end_timestamp(project.project_id, user_id)
|
||||
|
||||
if data.startTimestamp is None:
|
||||
logger.debug(f"No vault sessions found for project:{project.project_id}")
|
||||
return {
|
||||
'total': 0,
|
||||
'sessions': [],
|
||||
'src': 1
|
||||
}
|
||||
full_args, query_part = sessions_legacy.search_query_parts(data=data, error_status=error_status,
|
||||
errors_only=errors_only,
|
||||
favorite_only=data.bookmarked, issue=issue,
|
||||
|
|
|
|||
|
|
@ -64,6 +64,13 @@ def search_sessions(data: schemas.SessionsSearchPayloadSchema, project: schemas.
|
|||
platform="web"):
|
||||
if data.bookmarked:
|
||||
data.startTimestamp, data.endTimestamp = sessions_favorite.get_start_end_timestamp(project.project_id, user_id)
|
||||
if data.startTimestamp is None:
|
||||
logger.debug(f"No vault sessions found for project:{project.project_id}")
|
||||
return {
|
||||
'total': 0,
|
||||
'sessions': [],
|
||||
'src': 2
|
||||
}
|
||||
if project.platform == "web":
|
||||
full_args, query_part = sessions.search_query_parts_ch(data=data, error_status=error_status,
|
||||
errors_only=errors_only,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue