chore(assets): log when assets disabled due to missing DB deps
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled

Addresses CodeRabbit review: the missing-optional-dependency fallback in
setup_database() silently disabled the assets system with no startup
message, unlike the exception path which logs. Add a warning so operators
can tell why /api/assets/* returns 503.
This commit is contained in:
Matt Miller 2026-07-01 00:38:38 -07:00
parent a5ff07fe63
commit d224df799b

View File

@ -464,6 +464,7 @@ def setup_database():
# Optional DB dependencies are missing, so init_db() is skipped and the
# asset backend has no database. Disable assets so /api/assets/* returns
# a clean 503 instead of 500s against an uninitialized DB.
logging.warning("Optional database dependencies are missing; assets system disabled.")
disable_assets_routes()
asset_seeder.disable()
except Exception as e: