diff --git a/repositories/mixins.py b/repositories/mixins.py index 4dc6a12..36282c5 100644 --- a/repositories/mixins.py +++ b/repositories/mixins.py @@ -1,4 +1,4 @@ -from typing import Generic, TypeVar, Type, Optional, overload +from typing import Generic, TypeVar, Type, Optional from sqlalchemy import select, Select from sqlalchemy.ext.asyncio import AsyncSession @@ -64,7 +64,7 @@ class GetAllMixin(RepBaseMixin[EntityType]): return stmt async def get_all(self, *args) -> list[EntityType]: - stmt = select(self.entity_class).order_by(self.entity_class.id) + stmt = select(self.entity_class) if hasattr(self, "is_deleted"): stmt = stmt.where(self.entity_class.is_deleted.is_(False)) diff --git a/schemas/board.py b/schemas/board.py index 5de3229..69afb1a 100644 --- a/schemas/board.py +++ b/schemas/board.py @@ -10,6 +10,7 @@ class BoardSchema(BaseSchema): id: int name: str lexorank: str + project_id: int class CreateBoardSchema(BaseSchema):