oarepo-runtime 1.5.112__py3-none-any.whl → 1.5.113__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/services/schema/rdm_ui.py +11 -1
- {oarepo_runtime-1.5.112.dist-info → oarepo_runtime-1.5.113.dist-info}/METADATA +1 -1
- {oarepo_runtime-1.5.112.dist-info → oarepo_runtime-1.5.113.dist-info}/RECORD +7 -7
- {oarepo_runtime-1.5.112.dist-info → oarepo_runtime-1.5.113.dist-info}/LICENSE +0 -0
- {oarepo_runtime-1.5.112.dist-info → oarepo_runtime-1.5.113.dist-info}/WHEEL +0 -0
- {oarepo_runtime-1.5.112.dist-info → oarepo_runtime-1.5.113.dist-info}/entry_points.txt +0 -0
- {oarepo_runtime-1.5.112.dist-info → oarepo_runtime-1.5.113.dist-info}/top_level.txt +0 -0
@@ -1,7 +1,7 @@
|
|
1
1
|
import marshmallow as ma
|
2
2
|
from oarepo_runtime.services.schema.marshmallow import DictOnlySchema
|
3
3
|
from oarepo_vocabularies.services.ui_schema import VocabularyI18nStrUIField
|
4
|
-
|
4
|
+
from idutils import to_url
|
5
5
|
|
6
6
|
class RDMIdentifierWithSchemaUISchema(ma.Schema):
|
7
7
|
scheme = ma.fields.String(
|
@@ -9,6 +9,16 @@ class RDMIdentifierWithSchemaUISchema(ma.Schema):
|
|
9
9
|
)
|
10
10
|
identifier = ma.fields.String(required=True)
|
11
11
|
|
12
|
+
@ma.post_dump
|
13
|
+
def add_url(self, value, **kwargs):
|
14
|
+
if "identifier" in value and "scheme" in value:
|
15
|
+
url = to_url(
|
16
|
+
value["identifier"], value["scheme"].lower(), url_scheme="https"
|
17
|
+
)
|
18
|
+
if url:
|
19
|
+
value["url"] = url
|
20
|
+
return value
|
21
|
+
|
12
22
|
|
13
23
|
class RDMAwardIdentifierUISchema(ma.Schema):
|
14
24
|
identifier = ma.fields.String()
|
@@ -131,7 +131,7 @@ oarepo_runtime/services/schema/marshmallow_to_json_schema.py,sha256=VYLnVWHOoaxW
|
|
131
131
|
oarepo_runtime/services/schema/oneofschema.py,sha256=GnWH4Or_G5M0NgSmCoqMI6PBrJg5AC9RHrcB5QDKRq0,6661
|
132
132
|
oarepo_runtime/services/schema/polymorphic.py,sha256=bAbUoTIeDBiJPYPhpLEKKZekEdkHlpqkmNxk1hN3PDw,564
|
133
133
|
oarepo_runtime/services/schema/rdm.py,sha256=dBy1KCJ_XYAN_cffoRqLfQVEdZOKwmSpqGdEP4OL64k,1280
|
134
|
-
oarepo_runtime/services/schema/rdm_ui.py,sha256=
|
134
|
+
oarepo_runtime/services/schema/rdm_ui.py,sha256=x1cWvGbmmB1GNKu4Hyl65tc_j5TiKsyZm8Y2JQyHEB4,3389
|
135
135
|
oarepo_runtime/services/schema/ui.py,sha256=hHbj1S-DW1WqgYX31f6UjarY4wrE-qFLpH3oUhvGLyE,6192
|
136
136
|
oarepo_runtime/services/schema/validation.py,sha256=VFOKSxQLHwFb7bW8BJAFXWe_iTAZFOfqOnb2Ko_Yxxc,2085
|
137
137
|
oarepo_runtime/translations/default_translations.py,sha256=060GBlA1ghWxfeumo6NqxCCZDb-6OezOuF6pr-_GEOQ,104
|
@@ -147,9 +147,9 @@ tests/marshmallow_to_json/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
147
147
|
tests/marshmallow_to_json/test_datacite_ui_schema.py,sha256=82iLj8nW45lZOUewpWbLX3mpSkpa9lxo-vK-Qtv_1bU,48552
|
148
148
|
tests/marshmallow_to_json/test_simple_schema.py,sha256=izZN9p0v6kovtSZ6AdxBYmK_c6ZOti2_z_wPT_zXIr0,1500
|
149
149
|
tests/pkg_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
150
|
-
oarepo_runtime-1.5.
|
151
|
-
oarepo_runtime-1.5.
|
152
|
-
oarepo_runtime-1.5.
|
153
|
-
oarepo_runtime-1.5.
|
154
|
-
oarepo_runtime-1.5.
|
155
|
-
oarepo_runtime-1.5.
|
150
|
+
oarepo_runtime-1.5.113.dist-info/LICENSE,sha256=h2uWz0OaB3EN-J1ImdGJZzc7yvfQjvHVYdUhQ-H7ypY,1064
|
151
|
+
oarepo_runtime-1.5.113.dist-info/METADATA,sha256=UGtsZ8VPgPRyX2EXFUEZEEQV52jL8XeHHXWWhLdbyL8,4721
|
152
|
+
oarepo_runtime-1.5.113.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
153
|
+
oarepo_runtime-1.5.113.dist-info/entry_points.txt,sha256=k7O5LZUOGsVeSpB7ulU0txBUNp1CVQG7Q7TJIVTPbzU,491
|
154
|
+
oarepo_runtime-1.5.113.dist-info/top_level.txt,sha256=bHhlkT1_RQC4IkfTQCqA3iN4KCB6cSFQlsXpQMSP-bE,21
|
155
|
+
oarepo_runtime-1.5.113.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|