Skip to content

Commit

Permalink
renamed property in fairgraph ("hash" -> "hashes")
Browse files Browse the repository at this point in the history
  • Loading branch information
apdavison committed Oct 22, 2024
1 parent 3831070 commit 4fbc8c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions validation_service_api/validation_service/data_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4fbc8c7

Please sign in to comment.