oarepo-runtime 1.5.43__py3-none-any.whl → 1.5.44__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 +11 -0
- {oarepo_runtime-1.5.43.dist-info → oarepo_runtime-1.5.44.dist-info}/METADATA +1 -1
- {oarepo_runtime-1.5.43.dist-info → oarepo_runtime-1.5.44.dist-info}/RECORD +7 -7
- {oarepo_runtime-1.5.43.dist-info → oarepo_runtime-1.5.44.dist-info}/WHEEL +1 -1
- {oarepo_runtime-1.5.43.dist-info → oarepo_runtime-1.5.44.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.43.dist-info → oarepo_runtime-1.5.44.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.43.dist-info → oarepo_runtime-1.5.44.dist-info}/top_level.txt +0 -0
@@ -1,6 +1,8 @@
|
|
1
1
|
from base64 import b64decode
|
2
2
|
|
3
3
|
import requests
|
4
|
+
from deprecated import deprecated
|
5
|
+
from flask import current_app
|
4
6
|
from invenio_drafts_resources.services import RecordService as DraftRecordService
|
5
7
|
from invenio_records_resources.proxies import current_service_registry
|
6
8
|
from invenio_records_resources.services import FileService, RecordService
|
@@ -12,7 +14,16 @@ from requests.adapters import BaseAdapter
|
|
12
14
|
def get_record_service_for_record(record):
|
13
15
|
if not record:
|
14
16
|
return None
|
17
|
+
if "OAREPO_PRIMARY_RECORD_SERVICE" in current_app.config:
|
18
|
+
return current_app.config["OAREPO_PRIMARY_RECORD_SERVICE"][type(record)]
|
19
|
+
else:
|
20
|
+
return get_record_service_for_record_deprecated(record)
|
21
|
+
|
15
22
|
|
23
|
+
@deprecated(
|
24
|
+
version="1.5.43", reason="Please recompile model to remove this deprecation warning"
|
25
|
+
)
|
26
|
+
def get_record_service_for_record_deprecated(record):
|
16
27
|
if getattr(record, "is_draft", False):
|
17
28
|
record_name = "draft_cls"
|
18
29
|
expect_draft_service = True
|
@@ -25,7 +25,7 @@ oarepo_runtime/datastreams/semi_asynchronous.py,sha256=TJWby2MDKXm5feRocoWB-8Ohs
|
|
25
25
|
oarepo_runtime/datastreams/synchronous.py,sha256=t5lfnMkLqy3jK5zMl-nIuA0HlMPiHGjwCqZ8XQP-3GM,2595
|
26
26
|
oarepo_runtime/datastreams/transformers.py,sha256=q5KzHPl2kJg7HP1BtKJ7F_UMqg_7L1ZGDX0O7s8D6UI,521
|
27
27
|
oarepo_runtime/datastreams/types.py,sha256=KZjblc3T_UFFW7LrMDmiR8lqVf86V484LAHj6yg05EI,9908
|
28
|
-
oarepo_runtime/datastreams/utils.py,sha256=
|
28
|
+
oarepo_runtime/datastreams/utils.py,sha256=PAUVyL6AuD20PtESJcUEXsUeeSnxxKUB9LzxqwAgx9U,3939
|
29
29
|
oarepo_runtime/datastreams/readers/__init__.py,sha256=P1n3llZQ3AFHnSPbeT1VaCJcEtRFz9AbHfjkZv5LG7s,1103
|
30
30
|
oarepo_runtime/datastreams/readers/attachments.py,sha256=A7EC1TqyTHG-go5DIaRotlBSOm6o9hGqAKyVVAceCRU,1956
|
31
31
|
oarepo_runtime/datastreams/readers/excel.py,sha256=CM8lr8mejN7NgoK5TJb1oXpjq0HxklQKMsuj3uqjTjA,3653
|
@@ -117,9 +117,9 @@ oarepo_runtime/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hS
|
|
117
117
|
oarepo_runtime/utils/functools.py,sha256=gKS9YZtlIYcDvdNA9cmYO00yjiXBYV1jg8VpcRUyQyg,1324
|
118
118
|
oarepo_runtime/utils/path.py,sha256=V1NVyk3m12_YLbj7QHYvUpE1wScO78bYsX1LOLeXDkI,3108
|
119
119
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
120
|
-
oarepo_runtime-1.5.
|
121
|
-
oarepo_runtime-1.5.
|
122
|
-
oarepo_runtime-1.5.
|
123
|
-
oarepo_runtime-1.5.
|
124
|
-
oarepo_runtime-1.5.
|
125
|
-
oarepo_runtime-1.5.
|
120
|
+
oarepo_runtime-1.5.44.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
121
|
+
oarepo_runtime-1.5.44.dist-info/METADATA,sha256=pDJg1hNUd-gXeg2V2bhwmr0aIofecKPJb_43bXQF4RQ,4680
|
122
|
+
oarepo_runtime-1.5.44.dist-info/WHEEL,sha256=Wyh-_nZ0DJYolHNn1_hMa4lM7uDedD_RGVwbmTjyItk,91
|
123
|
+
oarepo_runtime-1.5.44.dist-info/entry_points.txt,sha256=QrlXAKuPDVBinaSh_v3yO9_Nb9ZNmJCJ0VFcCW-z0Jg,327
|
124
|
+
oarepo_runtime-1.5.44.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
125
|
+
oarepo_runtime-1.5.44.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|