Skip to content

Commit

Permalink
fix(core): properly formatted dataset image IDs (#3596)
Browse files Browse the repository at this point in the history
  • Loading branch information
olevski committed Aug 23, 2023
1 parent 20b5589 commit f624b2b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions renku/domain_model/dataset.py
Original file line number Diff line number Diff line change
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 = ImageObject.generate_id(self.id, self.images[image_ind].position)

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

0 comments on commit f624b2b

Please sign in to comment.