diff --git a/renku/domain_model/dataset.py b/renku/domain_model/dataset.py index d6bfcf1ae6..00d3856d45 100644 --- a/renku/domain_model/dataset.py +++ b/renku/domain_model/dataset.py @@ -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"]