feat(chalice): fixed old keys support for wrong payloads

This commit is contained in:
Taha Yassine Kraiem 2023-01-23 14:57:55 +01:00
parent a332606580
commit 716c40fd1f

View file

@ -551,6 +551,8 @@ class _SessionSearchEventRaw(__MixedSearchFilter):
@root_validator(pre=True)
def transform(cls, values):
if values.get("type") is None:
return values
values["type"] = {
"CLICK": EventType.click.value,
"INPUT": EventType.input.value,
@ -634,6 +636,8 @@ class SessionSearchFilterSchema(__MixedSearchFilter):
@root_validator(pre=True)
def transform(cls, values):
if values.get("type") is None:
return values
values["type"] = {
"USEROS": FilterType.user_os.value,
"USERBROWSER": FilterType.user_browser.value,