@@ -211,8 +211,35 @@ def insert_budgets(
211211 cur : sqlite3 .Cursor , budgets : list [dict [str , Any ]], lkos : dict [str , int ]
212212) -> None :
213213 cur .executemany (
214- "INSERT OR REPLACE INTO budgets (id, name, last_knowledge_of_server) VALUES (?, ?, ?)" ,
215- ((bid := b ["id" ], b ["name" ], lkos [bid ]) for b in budgets ),
214+ """
215+ INSERT OR REPLACE INTO budgets (
216+ id
217+ , name
218+ , currency_format_currency_symbol
219+ , currency_format_decimal_digits
220+ , currency_format_decimal_separator
221+ , currency_format_display_symbol
222+ , currency_format_group_separator
223+ , currency_format_iso_code
224+ , currency_format_symbol_first
225+ , last_knowledge_of_server
226+ ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
227+ """ ,
228+ (
229+ (
230+ bid := b ["id" ],
231+ b ["name" ],
232+ b ["currency_format" ]["currency_symbol" ],
233+ b ["currency_format" ]["decimal_digits" ],
234+ b ["currency_format" ]["decimal_separator" ],
235+ b ["currency_format" ]["display_symbol" ],
236+ b ["currency_format" ]["group_separator" ],
237+ b ["currency_format" ]["iso_code" ],
238+ b ["currency_format" ]["symbol_first" ],
239+ lkos [bid ],
240+ )
241+ for b in budgets
242+ ),
216243 )
217244
218245
0 commit comments