feat(chalice): correct missing sort key and order
This commit is contained in:
parent
5e8aad4cd6
commit
f920736ba3
1 changed files with 6 additions and 2 deletions
|
|
@ -639,7 +639,12 @@ class SessionsSearchPayloadSchema(_PaginatedSchema):
|
|||
|
||||
@root_validator(pre=True)
|
||||
def transform_order(cls, values):
|
||||
if values.get("order") is not None:
|
||||
if values.get("sort") is None:
|
||||
values["sort"] = "startTs"
|
||||
|
||||
if values.get("order") is None:
|
||||
values["order"] = SortOrderType.desc
|
||||
else:
|
||||
values["order"] = values["order"].upper()
|
||||
return values
|
||||
|
||||
|
|
@ -1206,4 +1211,3 @@ class FlatClickMapSessionsSearch(SessionsSearchPayloadSchema):
|
|||
values["events"] = n_events
|
||||
values["filters"] = n_filters
|
||||
return values
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue