diff --git a/surfsense_backend/app/notifications/__init__.py b/surfsense_backend/app/notifications/__init__.py index e29c58c0c..6ffe45000 100644 --- a/surfsense_backend/app/notifications/__init__.py +++ b/surfsense_backend/app/notifications/__init__.py @@ -6,6 +6,10 @@ the router in :mod:`app.notifications.api` exposes the inbox endpoints. from __future__ import annotations +# Initialize app.db first to avoid a partial-init circular import when this +# package is the entry point (e.g. Celery loading it before any ORM code). +import app.db # noqa: F401 + from app.notifications.persistence import Notification from app.notifications.service import NotificationService