*** Wartungsfenster jeden ersten Mittwoch vormittag im Monat ***

Skip to content
Snippets Groups Projects
Commit 3abc8ca3 authored by Moser, Maximilian's avatar Moser, Maximilian
Browse files

drafts: remove direct import of DraftMetadata

* get the DraftMetadata class from the record service instead of
  directly importing it from invenio-rdm-records
* prevents issues with renaming of the metadata class, etc.
parent 881c67ae
No related merge requests found
......@@ -8,7 +8,6 @@ from os.path import basename, isdir, isfile, join
import click
from flask.cli import with_appcontext
from invenio_files_rest.models import ObjectVersion
from invenio_rdm_records.records.models import DraftMetadata
from ..utils import get_draft_file_service, get_record_service
from .utils import (
......@@ -60,7 +59,7 @@ def list_drafts(user):
service = get_record_service()
recids = [
dm.json["id"]
for dm in DraftMetadata.query.all()
for dm in service.draft_cls.model_cls.query.all()
if dm is not None and dm.json is not None
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment