fix: explicitly import Site in manager_account to resolve relationship

SQLAlchemy couldn't resolve the string 'Site' in ManagerAccount's
relationship() at query time because Site wasn't guaranteed to be
imported first. Adding the explicit import ensures the mapper is
configured correctly regardless of import order.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-01 00:57:02 +03:00
parent 3598a929e0
commit 7d75ef44f7

View File

@@ -2,6 +2,7 @@ from sqlalchemy import Column, Integer, String, DateTime, Table, ForeignKey
from sqlalchemy.orm import relationship
from sqlalchemy.sql import func
from database import Base
from models.site import Site # noqa: F401 — needed so SQLAlchemy resolves "Site" in relationship
# Many-to-many: one manager can access multiple sites, one site can have multiple managers