Skip to content

Commit

Permalink
chore: last minute fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
ebezzi committed Dec 19, 2022
1 parent ee9b967 commit 41a6da7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion backend/layers/api/portal_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
DatasetArtifact,
DatasetArtifactId,
DatasetArtifactType,
DatasetId,
DatasetStatus,
DatasetVersion,
DatasetVersionId,
Expand Down Expand Up @@ -599,8 +600,10 @@ def get_dataset_identifiers(self, url: str):
except Exception:
raise ServerErrorHTTPException("Cannot parse URL")

# TODO: if we require it, add double id lookup
dataset = self.business_logic.get_dataset_version(DatasetVersionId(id))
if dataset is None:
# Lookup from canonical if the version cannot be found
dataset = self.business_logic.get_dataset_version_from_canonical(DatasetId(id))
if dataset is None:
raise NotFoundHTTPException()

Expand Down
1 change: 1 addition & 0 deletions scripts/cxg_admin_scripts/migrate.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,6 +467,7 @@ def migrate_redesign_write(ctx):
published_at=version["published_at"],
datasets=version["datasets"],
created_at=version.get("created_at"),
curator_name=version.get("curator_name"),
)
session.add(collection_version_row)
session.commit()
Expand Down

0 comments on commit 41a6da7

Please sign in to comment.