From cfdd81d37e9d0457217cfe68ec9150fa7212ba4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?dni=20=E2=9A=A1?= Date: Thu, 26 Sep 2024 13:39:03 +0200 Subject: [PATCH] fixup! --- lnbits/db.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lnbits/db.py b/lnbits/db.py index 5cae12506..878108106 100644 --- a/lnbits/db.py +++ b/lnbits/db.py @@ -175,7 +175,9 @@ class Connection(Compat): return dict_to_model(row, model) return row - async def update(self, table_name: str, model: BaseModel, where: str = "id = :id"): + async def update( + self, table_name: str, model: BaseModel, where: str = "WHERE id = :id" + ): await self.conn.execute( text(update_query(table_name, model, where)), model_to_dict(model) ) @@ -341,7 +343,7 @@ class Database(Compat): await conn.insert(table_name, model) async def update( - self, table_name: str, model: BaseModel, where: str = "id = :id" + self, table_name: str, model: BaseModel, where: str = "WHERE id = :id" ) -> None: async with self.connect() as conn: await conn.update(table_name, model, where)