invenio-app-rdm 14.0.0b1.dev6__py2.py3-none-any.whl → 14.0.0b1.dev7__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.
@@ -17,6 +17,6 @@
17
17
  #
18
18
  # See PEP 0440 for details - https://www.python.org/dev/peps/pep-0440
19
19
 
20
- __version__ = "14.0.0b1.dev6"
20
+ __version__ = "14.0.0b1.dev7"
21
21
 
22
22
  __all__ = ("__version__",)
@@ -115,7 +115,7 @@ def get_existing_deletion_request(record_id):
115
115
 
116
116
  def evaluate_record_deletion(record: RDMRecord, identity):
117
117
  """Evaluate whether a given record can be deleted by an identity."""
118
- rec_del = RDMRecordDeletionPolicy().evaluate(identity, record._record)
118
+ rec_del = RDMRecordDeletionPolicy().evaluate(identity, record)
119
119
 
120
120
  immediate, request = rec_del["immediate_deletion"], rec_del["request_deletion"]
121
121
  rd_enabled = immediate.enabled or request.enabled
@@ -138,7 +138,7 @@ def evaluate_record_deletion(record: RDMRecord, identity):
138
138
  ),
139
139
  "context": {
140
140
  "files": record.files.count,
141
- "internalDoi": record.pids["doi"]["provider"] != "external",
141
+ "internalDoi": record.pids.get("doi", {}).get("provider") != "external",
142
142
  },
143
143
  }
144
144
  else:
@@ -149,9 +149,7 @@ def evaluate_record_deletion(record: RDMRecord, identity):
149
149
  }
150
150
  record_deletion["existing_request"] = (
151
151
  # We show existing requests to valid users (even if they are not allowed to delete a record anymore).
152
- get_existing_deletion_request(record.id)
153
- if rd_valid_user
154
- else None
152
+ get_existing_deletion_request(record.pid.pid_value) if rd_valid_user else None
155
153
  )
156
154
 
157
155
  return record_deletion
@@ -551,7 +551,9 @@ def deposit_edit(pid_value, draft=None, draft_files=None, files_locked=True):
551
551
  )
552
552
  published_record = ui_serializer.dump_obj(published_record_result.to_dict())
553
553
 
554
- record_deletion = evaluate_record_deletion(published_record_result, g.identity)
554
+ record_deletion = evaluate_record_deletion(
555
+ published_record_result._record, g.identity
556
+ )
555
557
  else:
556
558
  record_deletion = {}
557
559
 
@@ -161,7 +161,7 @@ def record_detail(
161
161
 
162
162
  record_ui = UIJSONSerializer().dump_obj(record.to_dict())
163
163
 
164
- record_deletion = evaluate_record_deletion(record, g.identity)
164
+ record_deletion = evaluate_record_deletion(record._record, g.identity)
165
165
 
166
166
  # The deletion options are only needed if the user is allowed to delete the given record.
167
167
  record_deletion_options = (
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: invenio-app-rdm
3
- Version: 14.0.0b1.dev6
3
+ Version: 14.0.0b1.dev7
4
4
  Summary: Invenio Research Data Management.
5
5
  Home-page: https://github.com/inveniosoftware/invenio-app-rdm
6
6
  Author: CERN
@@ -101,6 +101,10 @@ https://inveniordm.docs.cern.ch
101
101
  Changes
102
102
  =======
103
103
 
104
+ Version v14.0.0b1.dev7 (released 2025-11-14)
105
+
106
+ - fix(views): pass API record to evaluate record deletion
107
+
104
108
  Version v14.0.0b1.dev6 (released 2025-11-13)
105
109
 
106
110
  - tombstone: add deletion policy
@@ -1,4 +1,4 @@
1
- invenio_app_rdm/__init__.py,sha256=dgL01pNwmR9Rbpjou2Z-ABn405Wbwe-iPYd4Ic9HSDQ,704
1
+ invenio_app_rdm/__init__.py,sha256=IhX4oovOmTSKNBhH2dME17O5Q0qQttX328Zqe8ZC2zY,704
2
2
  invenio_app_rdm/cli.py,sha256=G6QqNU2W6n6ICtTMnpeKFXIsdorncDmVXwwwsGH5F2k,2746
3
3
  invenio_app_rdm/config.py,sha256=kxAliLtzXLRysO8qxWxoSt1FhOjuDfzUi8xr40BBIYE,53632
4
4
  invenio_app_rdm/ext.py,sha256=K7syn5CU5If7yOclFeNOCZX_u5q6VB7NJEQVm41mlng,5286
@@ -47,7 +47,7 @@ invenio_app_rdm/fixtures/pages/.gitkeep,sha256=1HVs32jZTGcMkk-dV9RHGPZm5FdydwFIZ
47
47
  invenio_app_rdm/records_ui/__init__.py,sha256=c4_HH3R7fTOp7AnNQSF4P9h_mwOvL0SE9tkpo6SBnT8,327
48
48
  invenio_app_rdm/records_ui/searchapp.py,sha256=QD5fTdimVUC5K4ERVBjgXHZdbC3ZkgcR8LSIxFTPBQY,2697
49
49
  invenio_app_rdm/records_ui/sitemap.py,sha256=erWpwi8lx17ATicBo3dTwMiEEwHTilL8xTAkNCC3J4U,1619
50
- invenio_app_rdm/records_ui/utils.py,sha256=3fjY2D1dvQqF7IqOE4hPQqN3ANj1sbPlv-mYTALPWwY,5218
50
+ invenio_app_rdm/records_ui/utils.py,sha256=7mA150g4TXpiTn3zQE2JWaGUtatsQeNu3pSSE3EW4os,5217
51
51
  invenio_app_rdm/records_ui/previewer/__init__.py,sha256=T32i_ssGKONDpNB3gECpn20ubHvGYYVrNuIgCADioOM,267
52
52
  invenio_app_rdm/records_ui/previewer/iiif_simple.py,sha256=lGxB3g0hNVJDWnq5jV_KrKPwC-LR1C51DMjas1-UpBM,1589
53
53
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/deposit.html,sha256=jdtme926G943raYhGa-evTK9NfWdyDOWEoONLtb-o2Q,2791
@@ -90,9 +90,9 @@ invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/
90
90
  invenio_app_rdm/records_ui/templates/semantic-ui/invenio_app_rdm/records/macros/version.html,sha256=eA8-n81XUezkwPXvcG5v2sgLPQNTgr7hB36-_Gr-tVI,758
91
91
  invenio_app_rdm/records_ui/views/__init__.py,sha256=9DaDls04IQv7fYttDjLofIWGsRRjk-FwUYnIfxV3OWk,5840
92
92
  invenio_app_rdm/records_ui/views/decorators.py,sha256=-GdyPh2qIxV_wacAv5uChNx-HW2LiKjHQiRujiu42B4,16510
93
- invenio_app_rdm/records_ui/views/deposits.py,sha256=t0gP0TIreb5RcHRtDd3CIX0yEE-hasUJV6q68fM4veM,24363
93
+ invenio_app_rdm/records_ui/views/deposits.py,sha256=Ds9cck40PQVth9Xz-tA-G9UNl4EVP_JU_DBOt3RaCMo,24393
94
94
  invenio_app_rdm/records_ui/views/filters.py,sha256=hyQ1gsYi3ux5vH4-K85uTk0Se-91BQ5B1uXAI7rcajw,7143
95
- invenio_app_rdm/records_ui/views/records.py,sha256=ciYqS0Ljb0QZZA6aZymVEeVlSdLemwHKTVMN-7AWTtw,16777
95
+ invenio_app_rdm/records_ui/views/records.py,sha256=H1lZaKzr1QdX8QKvlm_-p4lPXMy6nQqHcB4NIlSYyAQ,16785
96
96
  invenio_app_rdm/redirector/__init__.py,sha256=AYCTGmfbmkHW3YJXMqXlWBXcBrUsta-QmL9ULX2bjwA,243
97
97
  invenio_app_rdm/redirector/resource.py,sha256=XuH6ZK0HVE5LdXoorlm8aI3deizvnZ5gFa9d1ihYosk,3312
98
98
  invenio_app_rdm/redirector/views.py,sha256=CTJ3EGEFKfc0lFwNb9pwH7MbMLiqaWnF8LA3xGIwahc,563
@@ -495,9 +495,9 @@ invenio_app_rdm/users_ui/views/__init__.py,sha256=SMdY2NJj9GICfr3Xuok7qdNYVtA2bJ
495
495
  invenio_app_rdm/users_ui/views/dashboard.py,sha256=iUn2PrODAwb8ugmMosJKAjPhUzjCiWiAWoXQr9RUFuc,1793
496
496
  invenio_app_rdm/users_ui/views/ui.py,sha256=W_eXM8dLVIrNHQB2UEh37C9BYoHauft6RyvcDNFHovA,1742
497
497
  invenio_app_rdm/utils/files.py,sha256=CruDyO2gDVadSlWEJD-WHpWHeOQ0juh-Ei9jz3D9yjc,3923
498
- invenio_app_rdm-14.0.0b1.dev6.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
499
- invenio_app_rdm-14.0.0b1.dev6.dist-info/METADATA,sha256=v1-RyTCgIufGTBL5q17LR9t-ja29-oUUVTx_RUr5Wxc,19409
500
- invenio_app_rdm-14.0.0b1.dev6.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
501
- invenio_app_rdm-14.0.0b1.dev6.dist-info/entry_points.txt,sha256=MwtT1SN5saWOgTYhNb5y0YGA9VGAi0kXN0cykIfsb4U,2405
502
- invenio_app_rdm-14.0.0b1.dev6.dist-info/top_level.txt,sha256=quZejDUw2vLfKQboNIuVLJ9fxZifdnCT_s2PNf1dfmk,16
503
- invenio_app_rdm-14.0.0b1.dev6.dist-info/RECORD,,
498
+ invenio_app_rdm-14.0.0b1.dev7.dist-info/licenses/LICENSE,sha256=AZXFHRrZa5s4m9DV7zZr4bPGTMUvcEPCodeV_AmFI8k,1204
499
+ invenio_app_rdm-14.0.0b1.dev7.dist-info/METADATA,sha256=q5QK6GHtZI5fCdY04sLOW5_EreejJSCPC2OlpJoaGqg,19514
500
+ invenio_app_rdm-14.0.0b1.dev7.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
501
+ invenio_app_rdm-14.0.0b1.dev7.dist-info/entry_points.txt,sha256=MwtT1SN5saWOgTYhNb5y0YGA9VGAi0kXN0cykIfsb4U,2405
502
+ invenio_app_rdm-14.0.0b1.dev7.dist-info/top_level.txt,sha256=quZejDUw2vLfKQboNIuVLJ9fxZifdnCT_s2PNf1dfmk,16
503
+ invenio_app_rdm-14.0.0b1.dev7.dist-info/RECORD,,