From 4fbc8c78c9609b19e72142c2cf15f375ade9e4c7 Mon Sep 17 00:00:00 2001 From: Andrew Davison Date: Tue, 22 Oct 2024 14:43:30 +0200 Subject: [PATCH] renamed property in fairgraph ("hash" -> "hashes") --- validation_service_api/validation_service/data_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/validation_service_api/validation_service/data_models.py b/validation_service_api/validation_service/data_models.py index 610b518a..0115324d 100644 --- a/validation_service_api/validation_service/data_models.py +++ b/validation_service_api/validation_service/data_models.py @@ -1185,7 +1185,7 @@ def get_storage_size_in_bytes(sso): return cls( download_url=file_obj.iri.value, - hash=file_obj.hash.digest if file_obj.hash else None, + hash=file_obj.hashes.digest if file_obj.hashes else None, # todo: fix this to handle possible multiple hashes size=get_storage_size_in_bytes(file_obj.storage_size), content_type=file_obj.format.name if file_obj.format else None, local_path=local_path, @@ -1243,7 +1243,7 @@ def to_kg_object(self, client): name=self.local_path, iri=IRI(str(self.download_url)), format=get_term("ContentType", self.content_type), - hash=omcore.Hash(algorithm="SHA-1", digest=self.hash), # are we sure we're using SHA-1? + hashes=omcore.Hash(algorithm="SHA-1", digest=self.hash), # are we sure we're using SHA-1? storage_size=omcore.QuantitativeValue( value=self.size, unit=BYTES