feat: Enhance Python environment setup with system Python option and improve dependency installation
refactor: Clean up imports in currencies and users routes fix: Update theme settings saving logic and clean up test imports
This commit is contained in:
@@ -43,15 +43,14 @@ def backfill(
|
||||
engine = create_engine(db_url)
|
||||
with engine.begin() as conn:
|
||||
# Ensure currency table exists
|
||||
res = (
|
||||
if db_url.startswith("sqlite:"):
|
||||
conn.execute(
|
||||
text(
|
||||
"SELECT name FROM sqlite_master WHERE type='table' AND name='currency';"
|
||||
)
|
||||
)
|
||||
if db_url.startswith("sqlite:")
|
||||
else conn.execute(text("SELECT to_regclass('public.currency');"))
|
||||
)
|
||||
else:
|
||||
conn.execute(text("SELECT to_regclass('public.currency');"))
|
||||
# Note: we don't strictly depend on the above - we assume migration was already applied
|
||||
|
||||
# Helper: find or create currency by code
|
||||
|
||||
@@ -16,8 +16,7 @@ from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
from typing import Iterable, Optional
|
||||
from typing import Optional
|
||||
|
||||
import psycopg2
|
||||
from psycopg2 import errors
|
||||
|
||||
Reference in New Issue
Block a user