Skip to content

Commit 94b02c0

Browse files
committed
chore: minor fix
Signed-off-by: Ben Selwyn-Smith <[email protected]>
1 parent e50043f commit 94b02c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/macaron/database/db_custom_types.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,8 @@ class ProvenancePayload(TypeDecorator): # pylint: disable=W0223
106106
#: :meta private:
107107
cache_ok = True
108108

109-
def process_bind_param(self, value: None | InTotoPayload, dialect: Any) -> None | Any:
110-
"""Process when storing a dict object to the SQLite db.
109+
def process_bind_param(self, value: None | InTotoPayload, dialect: Any) -> None | dict:
110+
"""Process when storing an InTotoPayload object to the SQLite db.
111111
112112
value: None | InTotoPayload
113113
The value being stored.
@@ -118,10 +118,10 @@ def process_bind_param(self, value: None | InTotoPayload, dialect: Any) -> None
118118
if not isinstance(value, InTotoPayload):
119119
raise TypeError("ProvenancePayload type expects an InTotoPayload.")
120120

121-
return value.statement.get("payload")
121+
return value.statement.get("predicate")
122122

123123
def process_result_value(self, value: None | dict, dialect: Any) -> None | InTotoPayload:
124-
"""Process when loading a dict object from the SQLite db.
124+
"""Process when loading an InTotoPayload object from the SQLite db.
125125
126126
value: None | dict
127127
The value being loaded.

0 commit comments

Comments
 (0)