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