oarepo-runtime 1.5.34__py3-none-any.whl → 1.5.36__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -34,6 +34,28 @@ class RecordItem(BaseRecordItem):
34
34
  class RecordList(BaseRecordList):
35
35
  components = []
36
36
 
37
+ @property
38
+ def aggregations(self):
39
+ """Get the search result aggregations."""
40
+ try:
41
+ result = super().aggregations
42
+ if result is None:
43
+ return result
44
+
45
+ for key in result.keys():
46
+ if 'buckets' in result[key]:
47
+ for bucket in result[key]['buckets']:
48
+ val = bucket['key']
49
+ label = bucket.get('label', '')
50
+
51
+ if not isinstance(val, str):
52
+ bucket['key'] = str(val)
53
+ if not isinstance(label, str):
54
+ bucket['label'] = str(label)
55
+ return result
56
+ except AttributeError:
57
+ return None
58
+
37
59
  @property
38
60
  def hits(self):
39
61
  """Iterator over the hits."""
@@ -130,3 +130,4 @@ class InvenioUISchema(ma.Schema):
130
130
  updated = LocalizedDateTime(dump_only=True)
131
131
  links = ma.fields.Raw(dump_only=True)
132
132
  revision_id = ma.fields.Integer(dump_only=True)
133
+ expanded = ma.fields.Raw(dump_only=True)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: oarepo-runtime
3
- Version: 1.5.34
3
+ Version: 1.5.36
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -70,7 +70,7 @@ oarepo_runtime/resources/localized_ui_json_serializer.py,sha256=3V9cJaG_e1PMXKVX
70
70
  oarepo_runtime/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
71
71
  oarepo_runtime/services/components.py,sha256=9wt9CmoCFA8Utbb8eNA-Mvzo5LCApHT9zHpWIWZNyXY,1506
72
72
  oarepo_runtime/services/generators.py,sha256=V582uA813AIXnFhzqUwakmDgBOI1SQe3XZeJtUXNbwM,872
73
- oarepo_runtime/services/results.py,sha256=gcITj-bWPwrGdNGGEiNWroRC-JLUoBaZbAMOZeDrQRg,1955
73
+ oarepo_runtime/services/results.py,sha256=ocEXdTl1Gdu-OmAkmB98Yf5t4IwsbESDf1r3GV73FTg,2706
74
74
  oarepo_runtime/services/search.py,sha256=ywfwGH7oAM44WeOSjlIsY_qoCMZJ1TlTLd_NgE2ow3Y,5296
75
75
  oarepo_runtime/services/config/__init__.py,sha256=SCqww5sV8qh3gmev6TE8EyJbD58juIEDCm_7MEHxtSg,440
76
76
  oarepo_runtime/services/config/permissions_presets.py,sha256=zApeA-2DYAlD--SzVz3vq_OFjq48Ko0pe08e4o2vxr4,6114
@@ -102,7 +102,7 @@ oarepo_runtime/services/schema/i18n_validation.py,sha256=fyMTi2Rw-KiHv7c7HN61zGx
102
102
  oarepo_runtime/services/schema/marshmallow.py,sha256=LmcSxvbZ9jIhkNHCqqxt1SA2UNijoDmIzqli1MkoTrE,1153
103
103
  oarepo_runtime/services/schema/oneofschema.py,sha256=X_pXzrkYcLGGAtGN1qltrz45OzD_atrJHkHkp3L01xg,6660
104
104
  oarepo_runtime/services/schema/polymorphic.py,sha256=f9yC7MGVynAFGM0fXIq0NbqGJxI65Xpi8GaM2ZM4c6Q,561
105
- oarepo_runtime/services/schema/ui.py,sha256=qDR-nukJmeLwDZCdqcBg3CbseQ_A_BdxXyt_R4Qc_2c,3732
105
+ oarepo_runtime/services/schema/ui.py,sha256=xQgW-zLyZoHldGw47uVtXQj-5LexVNKTholyq4MiBZo,3777
106
106
  oarepo_runtime/services/schema/validation.py,sha256=fahqKGDdIYWux5ZeoljrEe8VD2fDZR9VpfvYmTYAmpw,1050
107
107
  oarepo_runtime/translations/default_translations.py,sha256=060GBlA1ghWxfeumo6NqxCCZDb-6OezOuF6pr-_GEOQ,104
108
108
  oarepo_runtime/translations/jinjax_messages.jinja,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -115,9 +115,9 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
115
115
  oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
116
116
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
117
117
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
118
- oarepo_runtime-1.5.34.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
119
- oarepo_runtime-1.5.34.dist-info/METADATA,sha256=0JbXNMjCdPlCOSa9qn7U5nJm2k2JF6tOG3CRo6hnYtU,4680
120
- oarepo_runtime-1.5.34.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
121
- oarepo_runtime-1.5.34.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
122
- oarepo_runtime-1.5.34.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
123
- oarepo_runtime-1.5.34.dist-info/RECORD,,
118
+ oarepo_runtime-1.5.36.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
119
+ oarepo_runtime-1.5.36.dist-info/METADATA,sha256=yFDeGezqfZiK4mOLv_wBTHC75fBdmI2K4R7anq3fr34,4680
120
+ oarepo_runtime-1.5.36.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
121
+ oarepo_runtime-1.5.36.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
122
+ oarepo_runtime-1.5.36.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
123
+ oarepo_runtime-1.5.36.dist-info/RECORD,,