|
|
@@ -1456,11 +1456,14 @@ async def run_migrations(conn):
|
|
|
if is_sqlite():
|
|
|
for _col in _tristate_cols:
|
|
|
async with conn.begin_nested():
|
|
|
+ # B608 is a false positive here: _col is a hardcoded constant
|
|
|
+ # from _tristate_cols, never user input, and SQL identifiers
|
|
|
+ # can't be bound as parameters. Suppressed inline below.
|
|
|
await conn.execute(
|
|
|
- text(f"UPDATE print_queue SET {_col} = 'on' WHERE {_col} IN (1, '1', 'true', 'True')")
|
|
|
+ text(f"UPDATE print_queue SET {_col} = 'on' WHERE {_col} IN (1, '1', 'true', 'True')") # nosec B608
|
|
|
)
|
|
|
await conn.execute(
|
|
|
- text(f"UPDATE print_queue SET {_col} = 'off' WHERE {_col} IN (0, '0', 'false', 'False')")
|
|
|
+ text(f"UPDATE print_queue SET {_col} = 'off' WHERE {_col} IN (0, '0', 'false', 'False')") # nosec B608
|
|
|
)
|
|
|
else:
|
|
|
for _col in _tristate_cols:
|