From 7a76da405881f3b7c24c5dd0de0cbe34636bdf0d Mon Sep 17 00:00:00 2001 From: AlexSserb Date: Sat, 6 Sep 2025 11:28:48 +0400 Subject: [PATCH] fix: project_id in board schema and fixed get mixin --- repositories/mixins.py | 4 ++-- schemas/board.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) 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):