fix(chalice): fixed multi-metadata support (#2275)

(cherry picked from commit 6190a6b495)
This commit is contained in:
Kraiem Taha Yassine 2024-06-13 14:42:26 +02:00 committed by Taha Yassine Kraiem
parent 22d1177eef
commit 60af1214f6

View file

@ -801,7 +801,9 @@ class SessionsSearchPayloadSchema(_TimedSchema, _PaginatedSchema):
continue
j = i + 1
while j < len(values):
if values[i].type == values[j].type:
if values[i].type == values[j].type \
and values[i].operator == values[j].operator \
and (values[i].type != FilterType.metadata or values[i].source == values[j].source):
values[i].value += values[j].value
del values[j]
else: