Skip to content

Commit

Permalink
fix(core): properly formatted dataset image IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Aug 21, 2023
1 parent b358923 commit 6d53ddf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions renku/domain_model/dataset.py
Expand Up @@ -652,6 +652,13 @@ def update_metadata_from(self, other: "Dataset", exclude=None):
if self.date_published is not None:
self.date_created = None

# NOTE: Fix image IDs, in some cases the image IDs set by the providers can be malformed
# and not match the SHACL definition for Renku. This cannot be addressed in the dataset
# providers because the dataset providers do not have access to the dataset ID which is needed
# for setting the dataset image ID.
for image_ind in range(len(self.images)):
self.images[image_ind].id = f"{self.id}/images/{image_ind}"

def update_metadata(self, **kwargs):
"""Updates metadata."""
editable_attributes = ["creators", "description", "keywords", "title"]
Expand Down

0 comments on commit 6d53ddf

Please sign in to comment.