Skip to content

Commit

Permalink
Access status hotfix (#257)
Browse files Browse the repository at this point in the history
* Access status hotfix

* Access status hotfix

* Removed double serialization of tombstone
  • Loading branch information
mesemus authored Feb 17, 2025
1 parent f28a7f5 commit bb0424f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions oarepo_runtime/services/schema/ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,3 +180,12 @@ def _serialize(self, value, attr, obj, **kwargs):

class InvenioRDMUISchema(InvenioUISchema, RDMBaseRecordSchema):
is_draft = ma.fields.Boolean(dump_only=True)
access_status = AccessStatusField(attribute="access", dump_only=True)

def hide_tombstone(self, data):
"""Hide tombstone info if the record isn't deleted and metadata if it is."""
return data

def default_nested(self, data):
"""Serialize fields as empty dict for partial drafts."""
return data
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = oarepo-runtime
version = 1.5.94
version = 1.5.95
description = A set of runtime extensions of Invenio repository
authors = Alzbeta Pokorna
readme = README.md
Expand Down

0 comments on commit bb0424f

Please sign in to comment.