Skip to content

Commit

Permalink
only include draft if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
FynnBe committed May 27, 2024
1 parent e804721 commit 5089357
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bioimageio_collection_backoffice/remote_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,9 @@ def generate_collection_json(
error_in_published_entry = None
for rc in self.get_concepts():
versions: List[Union[RecordDraft, Record]] = (
[rc.draft] if mode == "draft" else [] + rc.get_published_versions()
[rc.draft]
if mode == "draft" and rc.draft.exists()
else [] + rc.get_published_versions()
)
try:
versions_in_collection = create_collection_entries(versions)
Expand Down

0 comments on commit 5089357

Please sign in to comment.