tags dynamic filters #4
This commit is contained in:
parent
9c84842c11
commit
eaf5c41e1d
|
|
@ -150,7 +150,7 @@ class CustomFacetedSearchFilterBackend(FacetedSearchFilterBackend):
|
|||
def merge_buckets(buckets: list, presrve_ids: list):
|
||||
"""Reduces all buckets preserving class"""
|
||||
result_bucket = buckets[0]
|
||||
result_bucket.tag.buckets = list(filter(lambda x: x in presrve_ids[0], result_bucket.tag.buckets._l_))
|
||||
result_bucket.tag.buckets = list(filter(lambda x: x['key'] in presrve_ids[0], result_bucket.tag.buckets._l_))
|
||||
for bucket, ids in list(zip(buckets, presrve_ids))[1:]:
|
||||
for tag in bucket.tag.buckets._l_:
|
||||
if tag['key'] in ids:
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user