From f74a6f4fe18a1ee3ceb8a8db76ff79c2065c5891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Mon, 9 Nov 2026 15:53:26 -0300 Subject: [PATCH] fix: the stamp sizes save again (cursor executemany) 7a.2b brought back the connection-level executemany psycopg does not have. Co-Authored-By: Claude Opus 5.5 (1M context) --- app/api/stamps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/api/stamps.py b/app/api/stamps.py index 91b1754..ec07236 100644 --- a/app/api/stamps.py +++ b/app/api/stamps.py @@ -27,7 +27,7 @@ def stamp_sizes(user=Depends(can('assemble'))): def save_stamp_sizes(body: StampSizeTable, user=Depends(can('manage'))): with db.connect() as c: c.execute('DELETE FROM dtf_local.stamp_sizes') - c.executemany('INSERT INTO dtf_local.stamp_sizes(letter,width_cm,updated_by) VALUES(%s,%s,%s)', + c.cursor().executemany('INSERT INTO dtf_local.stamp_sizes(letter,width_cm,updated_by) VALUES(%s,%s,%s)', [(row.letter, row.width_cm, user) for row in body.sizes]) audit('stamp_sizes_changed', operator=user, sizes=len(body.sizes)) return {'ok': True}