diff --git a/app/models/base.py b/app/models/base.py index aefc087..c990f49 100644 --- a/app/models/base.py +++ b/app/models/base.py @@ -49,6 +49,9 @@ class Group(AbstractConfiguration): ) def to_dict(self) -> GroupDict: + if not TYPE_CHECKING: + from app.models.mirrors import Origin # to prevent circular import + active_origins_query = ( db.session.query(aliased(Origin)) .filter(and_(Origin.group_id == self.id, Origin.destroyed.is_(None)))