From 75698bfd5ccf4226c993ffd7ce5da21cc71ef1b6 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Mon, 14 Oct 2024 15:38:00 +0300 Subject: [PATCH] fix: json stringify --- lnbits/db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lnbits/db.py b/lnbits/db.py index 68de06019..0b56ffee9 100644 --- a/lnbits/db.py +++ b/lnbits/db.py @@ -613,7 +613,7 @@ def model_to_dict(model: BaseModel) -> dict: if isinstance(value, datetime.datetime): _dict[key] = value.timestamp() continue - if type(type_) is type(BaseModel): + if type(type_) is type(BaseModel) or type_ is dict: _dict[key] = json.dumps(value) continue _dict[key] = value