Skip to content

Commit

Permalink
fix: check if outputs in db
Browse files Browse the repository at this point in the history
  • Loading branch information
callebtc committed Jan 4, 2025
1 parent 9975bd6 commit 3f45d9c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cashu/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,11 @@ def from_row(cls, row: Row):

# parse change from row as json
change = None
if row["change"]:
if "change" in row.keys() and row["change"]:
change = json.loads(row["change"])

outputs = None
if row["outputs"]:
if "outputs" in row.keys() and row["outputs"]:
outputs = json.loads(row["outputs"])

return cls(
Expand Down

0 comments on commit 3f45d9c

Please sign in to comment.