Skip to content

Commit

Permalink
fix draft collection
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed Jun 13, 2024
1 parent 10ddcdd commit 76156be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions bioimageio_collection_backoffice/remote_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,13 @@ def generate_collection_json(
id_map: Dict[str, IdInfo] = {}
for rc in self.get_concepts():
versions: Union[List[RecordDraft], List[Record]] = (
[rc.draft]
if mode == "draft" and rc.draft.exists()
([rc.draft] if rc.draft.exists() else [])
if mode == "draft"
else rc.get_published_versions()
)
if not versions:
continue

try:
versions_in_collection, id_map_update = create_collection_entries(
versions
Expand Down

0 comments on commit 76156be

Please sign in to comment.