invenio-app-rdm 13.0.0b2.dev11__py2.py3-none-any.whl → 13.0.0b2.dev13__py2.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.
- invenio_app_rdm/__init__.py +1 -1
- invenio_app_rdm/requests_ui/views/requests.py +23 -16
- {invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/METADATA +9 -1
- {invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/RECORD +8 -8
- {invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/WHEEL +0 -0
- {invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/entry_points.txt +0 -0
- {invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/licenses/LICENSE +0 -0
- {invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/top_level.txt +0 -0
invenio_app_rdm/__init__.py
CHANGED
|
@@ -53,9 +53,10 @@ def _resolve_topic_record(request):
|
|
|
53
53
|
user_owns_request = str(creator_id) == str(current_user.id)
|
|
54
54
|
|
|
55
55
|
if request["is_closed"] and not user_owns_request:
|
|
56
|
-
return dict(permissions={}, record_ui=None, record=None)
|
|
56
|
+
return dict(permissions={}, record_ui=None, record=None, record_uuid=None)
|
|
57
57
|
|
|
58
58
|
record = None
|
|
59
|
+
record_uuid = None
|
|
59
60
|
# parse the topic field to get the draft/record pid `record:abcd-efgh`
|
|
60
61
|
entity = ResolverRegistry.resolve_entity_proxy(request["topic"])
|
|
61
62
|
pid = entity._parse_ref_dict_id()
|
|
@@ -84,11 +85,15 @@ def _resolve_topic_record(request):
|
|
|
84
85
|
break
|
|
85
86
|
# read published record
|
|
86
87
|
record = current_rdm_records_service.read(g.identity, pid, expand=True)
|
|
88
|
+
record_uuid = current_rdm_records_service.record_cls.pid.resolve(pid).id
|
|
87
89
|
else:
|
|
88
90
|
# read draft
|
|
89
91
|
record = current_rdm_records_service.read_draft(
|
|
90
92
|
g.identity, pid, expand=True
|
|
91
93
|
)
|
|
94
|
+
record_uuid = current_rdm_records_service.draft_cls.pid.resolve(
|
|
95
|
+
pid, registered_only=False
|
|
96
|
+
).id
|
|
92
97
|
except (NoResultFound, PIDDoesNotExistError):
|
|
93
98
|
# We catch PIDDoesNotExistError because a published record with
|
|
94
99
|
# a soft-deleted draft will raise this error. The lines below
|
|
@@ -98,6 +103,7 @@ def _resolve_topic_record(request):
|
|
|
98
103
|
try:
|
|
99
104
|
# read published record
|
|
100
105
|
record = current_rdm_records_service.read(g.identity, pid, expand=True)
|
|
106
|
+
record_uuid = current_rdm_records_service.record_cls.pid.resolve(pid).id
|
|
101
107
|
except NoResultFound:
|
|
102
108
|
# record tab not displayed when the record is not found
|
|
103
109
|
# the request is probably not open anymore
|
|
@@ -116,9 +122,14 @@ def _resolve_topic_record(request):
|
|
|
116
122
|
"read",
|
|
117
123
|
]
|
|
118
124
|
)
|
|
119
|
-
return dict(
|
|
125
|
+
return dict(
|
|
126
|
+
permissions=permissions,
|
|
127
|
+
record_ui=record_ui,
|
|
128
|
+
record=record,
|
|
129
|
+
record_uuid=record_uuid,
|
|
130
|
+
)
|
|
120
131
|
|
|
121
|
-
return dict(permissions={}, record_ui=None, record=None)
|
|
132
|
+
return dict(permissions={}, record_ui=None, record=None, record_uuid=None)
|
|
122
133
|
|
|
123
134
|
|
|
124
135
|
def _resolve_record_or_draft_files(record, request):
|
|
@@ -163,7 +174,7 @@ def _resolve_record_or_draft_media_files(record, request):
|
|
|
163
174
|
return None
|
|
164
175
|
|
|
165
176
|
|
|
166
|
-
def _resolve_checks(
|
|
177
|
+
def _resolve_checks(record_uuid, request, community=None):
|
|
167
178
|
"""Resolve the checks for this draft/record related to the community and the request."""
|
|
168
179
|
# FIXME: Move this logic to invenio-checks
|
|
169
180
|
|
|
@@ -181,6 +192,10 @@ def _resolve_checks(record, request, community=None):
|
|
|
181
192
|
if not is_draft_submission and not is_record_inclusion:
|
|
182
193
|
return None
|
|
183
194
|
|
|
195
|
+
# Early exit if there is no record UUID (for instance for some closed requests)
|
|
196
|
+
if not record_uuid:
|
|
197
|
+
return None
|
|
198
|
+
|
|
184
199
|
# Resolve the target community from the request if the community was not passed as an argument
|
|
185
200
|
if not community:
|
|
186
201
|
community_uuid = request["receiver"]["community"]
|
|
@@ -196,16 +211,6 @@ def _resolve_checks(record, request, community=None):
|
|
|
196
211
|
communities.append(community_parent_id)
|
|
197
212
|
communities.append(community.id)
|
|
198
213
|
|
|
199
|
-
# Resolve the record UUID
|
|
200
|
-
if is_record_inclusion:
|
|
201
|
-
record_uuid = current_rdm_records_service.record_cls.pid.resolve(
|
|
202
|
-
record["id"]
|
|
203
|
-
).id
|
|
204
|
-
else:
|
|
205
|
-
record_uuid = current_rdm_records_service.draft_cls.pid.resolve(
|
|
206
|
-
record["id"], registered_only=False
|
|
207
|
-
).id
|
|
208
|
-
|
|
209
214
|
# Early exit if no check config found for the communities
|
|
210
215
|
from invenio_checks.models import CheckConfig, CheckRun
|
|
211
216
|
|
|
@@ -254,8 +259,9 @@ def user_dashboard_request_view(request, **kwargs):
|
|
|
254
259
|
topic = _resolve_topic_record(request)
|
|
255
260
|
record_ui = topic["record_ui"]
|
|
256
261
|
record = topic["record"]
|
|
262
|
+
record_uuid = topic["record_uuid"]
|
|
257
263
|
is_draft = record_ui["is_draft"] if record_ui else False
|
|
258
|
-
checks = _resolve_checks(
|
|
264
|
+
checks = _resolve_checks(record_uuid, request)
|
|
259
265
|
|
|
260
266
|
files = _resolve_record_or_draft_files(record_ui, request)
|
|
261
267
|
media_files = _resolve_record_or_draft_media_files(record_ui, request)
|
|
@@ -333,8 +339,9 @@ def community_dashboard_request_view(request, community, community_ui, **kwargs)
|
|
|
333
339
|
topic = _resolve_topic_record(request)
|
|
334
340
|
record_ui = topic["record_ui"]
|
|
335
341
|
record = topic["record"]
|
|
342
|
+
record_uuid = topic["record_uuid"]
|
|
336
343
|
is_draft = record_ui["is_draft"] if record_ui else False
|
|
337
|
-
checks = _resolve_checks(
|
|
344
|
+
checks = _resolve_checks(record_uuid, request, community)
|
|
338
345
|
|
|
339
346
|
permissions.update(topic["permissions"])
|
|
340
347
|
files = _resolve_record_or_draft_files(record_ui, request)
|
{invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: invenio-app-rdm
|
|
3
|
-
Version: 13.0.0b2.
|
|
3
|
+
Version: 13.0.0b2.dev13
|
|
4
4
|
Summary: Invenio Research Data Management.
|
|
5
5
|
Home-page: https://github.com/inveniosoftware/invenio-app-rdm
|
|
6
6
|
Author: CERN
|
|
@@ -97,6 +97,14 @@ https://inveniordm.docs.cern.ch
|
|
|
97
97
|
Changes
|
|
98
98
|
=======
|
|
99
99
|
|
|
100
|
+
Version v13.0.0b2.dev13 (released 2025-03-27)
|
|
101
|
+
|
|
102
|
+
- checks: add checks tab to requests (fix record ID retrieval with same logic as record)
|
|
103
|
+
|
|
104
|
+
Version v13.0.0b2.dev12 (released 2025-03-27)
|
|
105
|
+
|
|
106
|
+
- checks: add checks tab to requests (fix record ID retrieval)
|
|
107
|
+
|
|
100
108
|
Version v13.0.0b2.dev11 (released 2025-03-26)
|
|
101
109
|
|
|
102
110
|
- checks: add checks tab to requests (fix template inclusion)
|
{invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
invenio_app_rdm/__init__.py,sha256=
|
|
1
|
+
invenio_app_rdm/__init__.py,sha256=igJvn8vZNTgO17CCAu3ikuVM6fX7YvHM16hxgpLju4Q,700
|
|
2
2
|
invenio_app_rdm/cli.py,sha256=G6QqNU2W6n6ICtTMnpeKFXIsdorncDmVXwwwsGH5F2k,2746
|
|
3
3
|
invenio_app_rdm/config.py,sha256=aQHeG7QxiKx01eDi1Xo7hsOfyAfe_yb8SNrq-CDOYag,50448
|
|
4
4
|
invenio_app_rdm/ext.py,sha256=PkZhATGJDgYqBJQh41NdvBZWR83mgI3Eej6rj10UVJE,5278
|
|
@@ -98,7 +98,7 @@ invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity/
|
|
|
98
98
|
invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/subcommunity-invitation/index.html,sha256=347Saf8Fv78uevCbK2nFiOtNFUT0QyZSZS7lgoNzHdQ,1448
|
|
99
99
|
invenio_app_rdm/requests_ui/templates/semantic-ui/invenio_requests/user-access-request/index.html,sha256=ltSP9sYPnpmCKMDYpZYU25Wxr3Dfqe2RNDxm6bVjX_I,1779
|
|
100
100
|
invenio_app_rdm/requests_ui/views/__init__.py,sha256=7QiAyRq8Eu84IXwjzxK63vNeTZnowZ5P85xtw7XgRjs,397
|
|
101
|
-
invenio_app_rdm/requests_ui/views/requests.py,sha256=
|
|
101
|
+
invenio_app_rdm/requests_ui/views/requests.py,sha256=grC2bQWF36xzeftdOSjy_vBWAGSUbupOliPervenF6s,16048
|
|
102
102
|
invenio_app_rdm/requests_ui/views/ui.py,sha256=DBysYQa__gOCg-pikO6HmoVLmRmMAVWeTBiYhPa7PmA,2359
|
|
103
103
|
invenio_app_rdm/theme/__init__.py,sha256=QbkxNjjOmGKRlie96HfTXgnFeVQjOX0GdiZnHP7pIhs,277
|
|
104
104
|
invenio_app_rdm/theme/views.py,sha256=UJs2_C28BWsXY1JqbRK4_ML1JRtGo1yM2S0_W37JJo4,4545
|
|
@@ -524,7 +524,7 @@ invenio_app_rdm/users_ui/views/__init__.py,sha256=SMdY2NJj9GICfr3Xuok7qdNYVtA2bJ
|
|
|
524
524
|
invenio_app_rdm/users_ui/views/dashboard.py,sha256=iUn2PrODAwb8ugmMosJKAjPhUzjCiWiAWoXQr9RUFuc,1793
|
|
525
525
|
invenio_app_rdm/users_ui/views/ui.py,sha256=W_eXM8dLVIrNHQB2UEh37C9BYoHauft6RyvcDNFHovA,1742
|
|
526
526
|
invenio_app_rdm/utils/files.py,sha256=CruDyO2gDVadSlWEJD-WHpWHeOQ0juh-Ei9jz3D9yjc,3923
|
|
527
|
-
invenio_app_rdm-13.0.0b2.
|
|
527
|
+
invenio_app_rdm-13.0.0b2.dev13.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
|
|
528
528
|
tests/__init__.py,sha256=yKVf0yYRuxmXvyAtLjmfpHGVCsEkZOhs_FojAAM_w-8,244
|
|
529
529
|
tests/conftest.py,sha256=6iR-l-DIpQDxN2LLMu6kbHnLsmAW1m8Lq-j8rNNucf8,8956
|
|
530
530
|
tests/test_tasks.py,sha256=6l25lcMjL3ZuQr4hsxbAEjSTu_J1aKkOB3ZXqOZZIy0,3712
|
|
@@ -557,8 +557,8 @@ tests/ui/test_filters.py,sha256=Q90wsJffjMVir7wNX8taGf2KZleLtPbXZXHLTkBpzLA,284
|
|
|
557
557
|
tests/ui/test_signposting_ui.py,sha256=KCSjQlMD2VKlwQCyZYDwYjtVNL35x3u-ZC4ceD5y21w,3847
|
|
558
558
|
tests/ui/test_static.py,sha256=vO3OQAOhrQESJifnQfM1pw7JYz3J874O8BAb7Cc_PPA,868
|
|
559
559
|
tests/ui/test_stats_ui.py,sha256=LHa_0hjvpYvliSk_jknWy-90CO82jVElUfK5Ua_ZmfA,3554
|
|
560
|
-
invenio_app_rdm-13.0.0b2.
|
|
561
|
-
invenio_app_rdm-13.0.0b2.
|
|
562
|
-
invenio_app_rdm-13.0.0b2.
|
|
563
|
-
invenio_app_rdm-13.0.0b2.
|
|
564
|
-
invenio_app_rdm-13.0.0b2.
|
|
560
|
+
invenio_app_rdm-13.0.0b2.dev13.dist-info/METADATA,sha256=cmJEGFSozsFaxrVk461_ppA7Ja4ntogBxi3zCIeHfsQ,12096
|
|
561
|
+
invenio_app_rdm-13.0.0b2.dev13.dist-info/WHEEL,sha256=MAQBAzGbXNI3bUmkDsiV_duv8i-gcdnLzw7cfUFwqhU,109
|
|
562
|
+
invenio_app_rdm-13.0.0b2.dev13.dist-info/entry_points.txt,sha256=r1vTqYNABeWqRMWitzyR9FnBsAy-KYZKZCp95IziyLY,2070
|
|
563
|
+
invenio_app_rdm-13.0.0b2.dev13.dist-info/top_level.txt,sha256=NqTqrntInEAci7EXcNBvouXFMqwyjVQhEI0b7izYRBY,22
|
|
564
|
+
invenio_app_rdm-13.0.0b2.dev13.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{invenio_app_rdm-13.0.0b2.dev11.dist-info → invenio_app_rdm-13.0.0b2.dev13.dist-info}/top_level.txt
RENAMED
|
File without changes
|