Skip to content

Commit

Permalink
published service
Browse files Browse the repository at this point in the history
  • Loading branch information
Alzbeta Pokorna committed Jan 27, 2025
1 parent 2dc2f50 commit 6453b66
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 4 additions & 3 deletions oarepo_model_builder_rdm/datatypes/components/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ class RDMServiceComponent(DataTypeComponent):
depends_on = [ServiceModelComponent]

def before_model_prepare(self, datatype, *, context, **kwargs):

if not datatype.profile in ["record", "draft"]:
return
components_to_remove = [
'{{oarepo_runtime.services.files.FilesComponent}}',
'{{invenio_drafts_resources.services.records.components.DraftFilesComponent}}'
Expand All @@ -19,6 +16,10 @@ def before_model_prepare(self, datatype, *, context, **kwargs):
component for component in datatype.service_config["components"]
if component not in components_to_remove
]

if not datatype.profile in ["record", "draft"]:
return

datatype.definition["service"]["base-classes"] = ["invenio_rdm_records.services.services.RDMRecordService"]
datatype.definition["service-config"]["base-classes"] = ["oarepo_runtime.services.config.service.PermissionsPresetsConfigMixin",
"invenio_rdm_records.services.config.RDMRecordServiceConfig"]
1 change: 0 additions & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ fi
$PYTHON -m venv $VENV
. $VENV/bin/activate
pip install -U setuptools pip wheel nrp-devtools
$VENV/bin/nrp-devtools proxy 120 &
pip install "oarepo[tests, rdm]==${OAREPO_VERSION}.*"

pip install -e "./build-tests/${MODEL}[tests]"
Expand Down

0 comments on commit 6453b66

Please sign in to comment.