diff --git a/src/schemas/event_groups.py b/src/schemas/event_groups.py index 14ad93c..ab63afe 100644 --- a/src/schemas/event_groups.py +++ b/src/schemas/event_groups.py @@ -38,7 +38,7 @@ class ViewEventGroup(BaseModel): name: Optional[str] = None description: Optional[str] = None tags: list["ViewTag"] = Field(default_factory=list) - ownerships: list["Ownership"] = Field(default_factory=list) + # ownerships: list["Ownership"] = Field(default_factory=list) @validator("tags", pre=True, always=True) def _validate_tags(cls, v): diff --git a/src/schemas/tags.py b/src/schemas/tags.py index 8307931..7e700f5 100644 --- a/src/schemas/tags.py +++ b/src/schemas/tags.py @@ -3,7 +3,7 @@ import json from typing import Optional -from pydantic import BaseModel, validator, Json, Field +from pydantic import BaseModel, validator, Json from src.schemas.ownership import Ownership @@ -28,7 +28,7 @@ class ViewTag(BaseModel): name: Optional[str] = None satellite: Optional[dict] = None - ownerships: list[Ownership] = Field(default_factory=list) + # ownerships: list[Ownership] = Field(default_factory=list) @validator("satellite", pre=True, always=True) def _validate_satellite(cls, v): diff --git a/src/storages/sql/__mixin__.py b/src/storages/sql/__mixin__.py index 564289c..dae89e0 100644 --- a/src/storages/sql/__mixin__.py +++ b/src/storages/sql/__mixin__.py @@ -59,7 +59,7 @@ class Ownership(Base): @declared_attr def ownerships(cls) -> Mapped[list["Ownership"]]: - return relationship(cls.Ownership, lazy="selectin", cascade="all, delete-orphan") + return relationship(cls.Ownership, cascade="all, delete-orphan") return Mixin