oarepo-runtime 1.5.39__py3-none-any.whl → 1.5.40__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -78,6 +78,19 @@ class GroupedFacetsParam(FacetsParam):
78
78
 
79
79
  return search
80
80
 
81
+ def filter(self, search):
82
+ """Apply a post filter on the search."""
83
+ if not self._filters:
84
+ return search
85
+
86
+ filters = list(self._filters.values())
87
+
88
+ _filter = filters[0]
89
+ for f in filters[1:]:
90
+ _filter &= f
91
+
92
+ return search.filter(_filter)
93
+
81
94
  def apply(self, identity, search, params):
82
95
  """Evaluate the facets on the search."""
83
96
  facets_values = params.pop("facets", {})
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oarepo-runtime
3
- Version: 1.5.39
3
+ Version: 1.5.40
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -87,7 +87,7 @@ oarepo_runtime/services/facets/enum.py,sha256=3LrShQIt9Vt5mkqUkc6FNxXCW5JEFdPwtG
87
87
  oarepo_runtime/services/facets/facet_groups_names.py,sha256=RR8eeUmD8d9t966JqfhslZnILn_xDSfYlL0hjyJT92Y,468
88
88
  oarepo_runtime/services/facets/max_facet.py,sha256=TZ4KMKKVJHzyU1KgNne4V7IMQPu1ALRpkz61Y0labrc,407
89
89
  oarepo_runtime/services/facets/nested_facet.py,sha256=y0xgjx37HsSj2xW7URxNemYTksD8hpPs7kOEfIBw22k,971
90
- oarepo_runtime/services/facets/params.py,sha256=5z8I4wKdp-7RJK4x6cSKE92fDJI8OkUz5JR5UKWAeYg,3564
90
+ oarepo_runtime/services/facets/params.py,sha256=NJLgqRYyamap6_ecpy6fgPpCl7JkcGPrY8xLl8jIZj8,3872
91
91
  oarepo_runtime/services/files/__init__.py,sha256=K8MStrEQf_BUhvzhwPTF93Hkhwrd1dtv35LDo7iZeTM,268
92
92
  oarepo_runtime/services/files/components.py,sha256=x6Wd-vvkqTqB1phj2a6h42DNQksN8PuR2XKaOGoNHfw,2400
93
93
  oarepo_runtime/services/files/service.py,sha256=8DH0Pefr9kilM2JnOb-UYsnqerE8Z1Mu4p6DOJ4j_ZU,608
@@ -116,9 +116,9 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
116
116
  oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
117
117
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
118
118
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
119
- oarepo_runtime-1.5.39.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
120
- oarepo_runtime-1.5.39.dist-info/METADATA,sha256=RGiou0J7zgp38I8Amo2FdSs2OejAezp8e3j5eqInPPg,4680
121
- oarepo_runtime-1.5.39.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
122
- oarepo_runtime-1.5.39.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
123
- oarepo_runtime-1.5.39.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
124
- oarepo_runtime-1.5.39.dist-info/RECORD,,
119
+ oarepo_runtime-1.5.40.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
120
+ oarepo_runtime-1.5.40.dist-info/METADATA,sha256=ACzPUTjB7ln5HYSSmBh4szWrV-E3bPfPpUinQIcweiY,4680
121
+ oarepo_runtime-1.5.40.dist-info/WHEEL,sha256=mguMlWGMX-VHnMpKOjjQidIo1ssRlCFu4a4mBpz1s2M,91
122
+ oarepo_runtime-1.5.40.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
123
+ oarepo_runtime-1.5.40.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
124
+ oarepo_runtime-1.5.40.dist-info/RECORD,,