oarepo-runtime 1.5.74__py3-none-any.whl → 1.5.75__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.
- oarepo_runtime/datastreams/utils.py +6 -2
- oarepo_runtime/services/records/__init__.py +3 -0
- oarepo_runtime/services/records/links.py +21 -0
- {oarepo_runtime-1.5.74.dist-info → oarepo_runtime-1.5.75.dist-info}/METADATA +1 -1
- {oarepo_runtime-1.5.74.dist-info → oarepo_runtime-1.5.75.dist-info}/RECORD +9 -7
- {oarepo_runtime-1.5.74.dist-info → oarepo_runtime-1.5.75.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.74.dist-info → oarepo_runtime-1.5.75.dist-info}/WHEEL +0 -0
- {oarepo_runtime-1.5.74.dist-info → oarepo_runtime-1.5.75.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.74.dist-info → oarepo_runtime-1.5.75.dist-info}/top_level.txt +0 -0
@@ -15,12 +15,16 @@ def get_record_service_for_record(record):
|
|
15
15
|
if not record:
|
16
16
|
return None
|
17
17
|
if "OAREPO_PRIMARY_RECORD_SERVICE" in current_app.config:
|
18
|
-
|
19
|
-
return current_service_registry.get(service_id)
|
18
|
+
return get_record_service_for_record_class(type(record))
|
20
19
|
else:
|
21
20
|
return get_record_service_for_record_deprecated(record)
|
22
21
|
|
23
22
|
|
23
|
+
def get_record_service_for_record_class(record_cls):
|
24
|
+
service_id = current_app.config["OAREPO_PRIMARY_RECORD_SERVICE"][record_cls]
|
25
|
+
return current_service_registry.get(service_id)
|
26
|
+
|
27
|
+
|
24
28
|
@deprecated(
|
25
29
|
version="1.5.43", reason="Please recompile model to remove this deprecation warning"
|
26
30
|
)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
from invenio_records_resources.services.base.links import Link
|
2
|
+
|
3
|
+
def pagination_links_html(tpl: str)->dict[str, Link]:
|
4
|
+
"""Create pagination links (prev/selv/next) from the same template."""
|
5
|
+
return {
|
6
|
+
"prev_html": Link(
|
7
|
+
tpl,
|
8
|
+
when=lambda pagination, ctx: pagination.has_prev,
|
9
|
+
vars=lambda pagination, vars: vars["args"].update(
|
10
|
+
{"page": pagination.prev_page.page}
|
11
|
+
),
|
12
|
+
),
|
13
|
+
"self_html": Link(tpl),
|
14
|
+
"next_html": Link(
|
15
|
+
tpl,
|
16
|
+
when=lambda pagination, ctx: pagination.has_next,
|
17
|
+
vars=lambda pagination, vars: vars["args"].update(
|
18
|
+
{"page": pagination.next_page.page}
|
19
|
+
),
|
20
|
+
),
|
21
|
+
}
|
@@ -26,7 +26,7 @@ oarepo_runtime/datastreams/semi_asynchronous.py,sha256=kNc6BBnV6oFoY9kHgf5l8fd1w
|
|
26
26
|
oarepo_runtime/datastreams/synchronous.py,sha256=t5lfnMkLqy3jK5zMl-nIuA0HlMPiHGjwCqZ8XQP-3GM,2595
|
27
27
|
oarepo_runtime/datastreams/transformers.py,sha256=q5KzHPl2kJg7HP1BtKJ7F_UMqg_7L1ZGDX0O7s8D6UI,521
|
28
28
|
oarepo_runtime/datastreams/types.py,sha256=KZjblc3T_UFFW7LrMDmiR8lqVf86V484LAHj6yg05EI,9908
|
29
|
-
oarepo_runtime/datastreams/utils.py,sha256=
|
29
|
+
oarepo_runtime/datastreams/utils.py,sha256=WvYwvCnmS0vrcQ-Fbptu-GvBTMx_8UVhUqs_-BN-p-E,4111
|
30
30
|
oarepo_runtime/datastreams/readers/__init__.py,sha256=P1n3llZQ3AFHnSPbeT1VaCJcEtRFz9AbHfjkZv5LG7s,1103
|
31
31
|
oarepo_runtime/datastreams/readers/attachments.py,sha256=A7EC1TqyTHG-go5DIaRotlBSOm6o9hGqAKyVVAceCRU,1956
|
32
32
|
oarepo_runtime/datastreams/readers/excel.py,sha256=CM8lr8mejN7NgoK5TJb1oXpjq0HxklQKMsuj3uqjTjA,3653
|
@@ -101,6 +101,8 @@ oarepo_runtime/services/files/components.py,sha256=x6Wd-vvkqTqB1phj2a6h42DNQksN8
|
|
101
101
|
oarepo_runtime/services/files/service.py,sha256=8DH0Pefr9kilM2JnOb-UYsnqerE8Z1Mu4p6DOJ4j_ZU,608
|
102
102
|
oarepo_runtime/services/permissions/__init__.py,sha256=Cgin2Zr1fpaYr-aZcUotdmv0hsrPTUJVQt8ouvU8tuU,95
|
103
103
|
oarepo_runtime/services/permissions/generators.py,sha256=YEOBCCvU-RG0BSWMtg76sv8qLcMbXxNu3rRJPDLtvvQ,1371
|
104
|
+
oarepo_runtime/services/records/__init__.py,sha256=hIoa2fx1AkDr6c-MgY561U2oN9LFeUCtfbVnetpBUOg,78
|
105
|
+
oarepo_runtime/services/records/links.py,sha256=gVe-_hGkLtX7pd6sS6jTbRIhBby2FTn9PXyYPy3yxzs,737
|
104
106
|
oarepo_runtime/services/relations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
105
107
|
oarepo_runtime/services/relations/components.py,sha256=3g0VdnGUM-2yYt50fPi-OADReBGJb4h05vmYHfh-QFs,592
|
106
108
|
oarepo_runtime/services/relations/errors.py,sha256=VtlOKq9MEUeJ4IsiZhY7lWoshrusA_RL4SOHe2titno,552
|
@@ -130,9 +132,9 @@ tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
130
132
|
tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
|
131
133
|
tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
|
132
134
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
133
|
-
oarepo_runtime-1.5.
|
134
|
-
oarepo_runtime-1.5.
|
135
|
-
oarepo_runtime-1.5.
|
136
|
-
oarepo_runtime-1.5.
|
137
|
-
oarepo_runtime-1.5.
|
138
|
-
oarepo_runtime-1.5.
|
135
|
+
oarepo_runtime-1.5.75.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
136
|
+
oarepo_runtime-1.5.75.dist-info/METADATA,sha256=hd71O2EzxcURIGg7qgV2G41KUG1ZBaoazG-lox_VHMw,4720
|
137
|
+
oarepo_runtime-1.5.75.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
|
138
|
+
oarepo_runtime-1.5.75.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
|
139
|
+
oarepo_runtime-1.5.75.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
140
|
+
oarepo_runtime-1.5.75.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|