Skip to content

Commit b99a68a

Browse files
committed
fix: replace custom json_dumps with standard json.dumps for hashing
1 parent d74bcd1 commit b99a68a

File tree

1 file changed

+2
-2
lines changed
  • packages/models-library/src/models_library/utils

1 file changed

+2
-2
lines changed

packages/models-library/src/models_library/utils/nodes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import hashlib
2+
import json
23
import logging
34
from collections.abc import Callable, Coroutine
45
from copy import deepcopy
56
from typing import Any
67

7-
from common_library.json_serialization import json_dumps
88
from pydantic import BaseModel, TypeAdapter
99

1010
from ..projects import Project
@@ -67,6 +67,6 @@ async def compute_node_hash(
6767
# now create the hash
6868
# WARNING: Here we cannot change to json_serialization.json_dumps because if would create a different dump string and therefore a different hash
6969
# NOTE that these hashes might have been already stored elsewhere
70-
block_string = json_dumps(resolved_payload, sort_keys=True).encode("utf-8")
70+
block_string = json.dumps(resolved_payload, sort_keys=True).encode("utf-8")
7171
raw_hash = hashlib.sha256(block_string)
7272
return raw_hash.hexdigest()

0 commit comments

Comments
 (0)