oarepo-runtime 1.9.2__py3-none-any.whl → 1.9.3__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,15 +18,17 @@ class MultilingualDumper(SearchDumperExt):
18
18
  def dump(self, record, data):
19
19
  for path in self.path_traversal.iter(data):
20
20
  rec = path[-1].current
21
- if rec["lang"] in self.SUPPORTED_LANGS:
22
- el_name = path[-1].key + "_" + rec["lang"]
21
+ lang = rec.get("lang", None)
22
+ if lang and lang in self.SUPPORTED_LANGS:
23
+ el_name = path[-1].key + "_" + lang
23
24
  path[-1].parent_data.setdefault(el_name, []).append(rec["value"])
24
25
  return data
25
26
 
26
27
  def load(self, data, record_cls):
27
28
  for path in self.path_traversal.iter(data):
28
29
  rec = path[-1].current
29
- if rec["lang"] in self.SUPPORTED_LANGS:
30
- el_name = path[-1].key + "_" + rec["lang"]
30
+ lang = rec.get("lang", None)
31
+ if lang and lang in self.SUPPORTED_LANGS:
32
+ el_name = path[-1].key + "_" + lang
31
33
  path[-1].parent_data.pop(el_name, None)
32
34
  return data
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: oarepo-runtime
3
- Version: 1.9.2
3
+ Version: 1.9.3
4
4
  Summary: A set of runtime extensions of Invenio repository
5
5
  Description-Content-Type: text/markdown
6
6
  License-File: LICENSE
@@ -58,7 +58,7 @@ oarepo_runtime/records/drafts.py,sha256=8BRmxXcKyVMBQbMMhVScPS_T7lwvR8kGKYQAxaVa
58
58
  oarepo_runtime/records/pid_providers.py,sha256=V9KIeffLoFwjh7PDEBkpmVQb2j7w9pgKr9OlHV5g8S4,736
59
59
  oarepo_runtime/records/dumpers/__init__.py,sha256=OmzNhLdMNKibmCksnj9eTX9xPBG30dziiK3j3bAAp3k,233
60
60
  oarepo_runtime/records/dumpers/edtf_interval.py,sha256=8bE3JlaR7b33rxDc7LW9R8jcwNI66Zb07Jee6YUmlrE,1231
61
- oarepo_runtime/records/dumpers/multilingual_dumper.py,sha256=PbNFCLsiH4XV3E1v8xga_fzlcEImHy8OXn_UKh_8VBU,1090
61
+ oarepo_runtime/records/dumpers/multilingual_dumper.py,sha256=vcoY25VZSyo3q7Zgexo0IOkE6xq1yTAM3uq7GZcSgUQ,1162
62
62
  oarepo_runtime/records/entity_resolvers/__init__.py,sha256=UiiIT54pUu9j7qPAPfqVp4UTnXnppp0c_LtKbFnyt6Y,383
63
63
  oarepo_runtime/records/entity_resolvers/proxies.py,sha256=P9c8JeHc25i_v8uXxTMHNlMNTFskET6dTM0VVMfLfyk,2097
64
64
  oarepo_runtime/records/mappings/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -150,13 +150,13 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
150
150
  oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
151
151
  oarepo_runtime/utils/index.py,sha256=ArrUUXB-KowUcUksRKqcFpmqct4bn9alO1zd_kX2tmU,292
152
152
  oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
153
- oarepo_runtime-1.9.2.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
153
+ oarepo_runtime-1.9.3.dist-info/licenses/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
154
154
  tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
155
  tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
156
156
  tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
157
157
  tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
158
- oarepo_runtime-1.9.2.dist-info/METADATA,sha256=o-rT5Q2aByveCjJPC48lEVUE4GRgo_gLBom6k_gAExA,4788
159
- oarepo_runtime-1.9.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
160
- oarepo_runtime-1.9.2.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
161
- oarepo_runtime-1.9.2.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
162
- oarepo_runtime-1.9.2.dist-info/RECORD,,
158
+ oarepo_runtime-1.9.3.dist-info/METADATA,sha256=TCd9T3D_rVijLNLyRH5HeSNcxdWs0h6qT38B0NMuf1Q,4788
159
+ oarepo_runtime-1.9.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
160
+ oarepo_runtime-1.9.3.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
161
+ oarepo_runtime-1.9.3.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
162
+ oarepo_runtime-1.9.3.dist-info/RECORD,,