diff --git a/requirements-swh.txt b/requirements-swh.txt --- a/requirements-swh.txt +++ b/requirements-swh.txt @@ -1,3 +1,3 @@ swh.core[db,http] >= 0.5 -swh.model >= 0.6.6 +swh.model >= 0.7.2 swh.objstorage >= 0.2.2 diff --git a/swh/storage/validate.py b/swh/storage/validate.py --- a/swh/storage/validate.py +++ b/swh/storage/validate.py @@ -38,7 +38,7 @@ def _check_hashes(self, objects: Iterable): for obj in objects: - id_ = hash_to_bytes(obj.__class__.compute_hash(obj.to_dict())) + id_ = hash_to_bytes(obj.compute_hash()) if id_ != obj.id: raise StorageArgumentException( f"Object has id {hash_to_hex(obj.id)}, "