Skip to content

Commit c6833be

Browse files
authored
fix(core): properly formatted dataset image IDs (#3596)
1 parent ffd987e commit c6833be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

renku/domain_model/dataset.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,13 @@ def update_metadata_from(self, other: "Dataset", exclude=None):
652652
if self.date_published is not None:
653653
self.date_created = None
654654

655+
# NOTE: Fix image IDs, in some cases the image IDs set by the providers can be malformed
656+
# and not match the SHACL definition for Renku. This cannot be addressed in the dataset
657+
# providers because the dataset providers do not have access to the dataset ID which is needed
658+
# for setting the dataset image ID.
659+
for image_ind in range(len(self.images)):
660+
self.images[image_ind].id = ImageObject.generate_id(self.id, self.images[image_ind].position)
661+
655662
def update_metadata(self, **kwargs):
656663
"""Updates metadata."""
657664
editable_attributes = ["creators", "description", "keywords", "title"]

0 commit comments

Comments
 (0)