Skip to content

Commit

Permalink
Patch in compute_hash for aiida-core <2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhollas committed Jan 8, 2025
1 parent f1c1727 commit 428fdb9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions aiida_test_cache/archive_cache/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,14 @@ def _get_objects_to_hash(self):
def get_objects_to_hash(self):
return hash_objects_func(self)

# Compatibility with aiida-core < 2.6
# https://github.com/aiidateam/aiida-core/pull/6347
def compute_hash(self):
try:
return super().compute_hash()
except AttributeError:
return super().get_hash()

monkeypatch.setattr(node_class, "_CLS_NODE_CACHING", MockNodeCaching)


Expand Down

0 comments on commit 428fdb9

Please sign in to comment.