Dev (#2366)
* refactor(chalice): upgraded dependencies * refactor(chalice): upgraded dependencies feat(chalice): support heatmaps * feat(chalice): support table-of-browsers showing user-count * feat(chalice): support table-of-devices showing user-count * feat(chalice): support table-of-URLs showing user-count * fix(chalice): fixed Math-operators validation refactor(chalice): search for sessions that have events for heatmaps * refactor(chalice): search for sessions that have at least 1 location event for heatmaps * fix(chalice): fix wrong received filter payload
This commit is contained in:
parent
a9251a8c8a
commit
51c12c3d0c
1 changed files with 7 additions and 3 deletions
|
|
@ -761,14 +761,18 @@ class SessionsSearchPayloadSchema(_TimedSchema, _PaginatedSchema):
|
|||
|
||||
@model_validator(mode="before")
|
||||
def add_missing_attributes(cls, values):
|
||||
# in case isEvent is wrong:
|
||||
for f in values.get("filters"):
|
||||
if EventType.has_value(f["type"]) and not f.get("isEvent"):
|
||||
f["isEvent"] = True
|
||||
elif FilterType.has_value(f["type"]) and f.get("isEvent"):
|
||||
f["isEvent"] = False
|
||||
|
||||
# in case the old search payload was passed
|
||||
if len(values.get("events", [])) > 0:
|
||||
for v in values["events"]:
|
||||
v["isEvent"] = True
|
||||
|
||||
# for v in values.get("filters", []):
|
||||
# if v.get("isEvent") is None:
|
||||
# v["isEvent"] = False
|
||||
return values
|
||||
|
||||
@model_validator(mode="before")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue