From 2c064acf33e46c57765d021606fd084d01db3cb7 Mon Sep 17 00:00:00 2001 From: xingc Date: Tue, 29 Apr 2025 16:50:36 +0800 Subject: [PATCH] =?UTF-8?q?fix(card):=20=E4=BF=AE=E5=A4=8D=E5=8D=A1?= =?UTF-8?q?=E7=89=87=E5=88=97=E8=A1=A8=EF=BC=88=E6=89=80=E6=9C=89=E8=80=85?= =?UTF-8?q?=EF=BC=89=E6=9F=A5=E8=AF=A2=E4=B8=BA=E7=A9=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/routers/card/routes.py | 2 +- core/routers/card/schema.py | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/core/routers/card/routes.py b/core/routers/card/routes.py index e406b2e..53776e2 100644 --- a/core/routers/card/routes.py +++ b/core/routers/card/routes.py @@ -99,7 +99,7 @@ async def get_me_all_card( conditions.append(Card.category == category) if category == 'displayed': - conditions.append(UserCollection.displayed is True) + conditions.append(UserCollection.displayed == True) # 记录总数查询 total_stmt = ( diff --git a/core/routers/card/schema.py b/core/routers/card/schema.py index e3b10df..f4d22f0 100644 --- a/core/routers/card/schema.py +++ b/core/routers/card/schema.py @@ -71,6 +71,7 @@ class CardOut(CardVisitOut): id: Optional[int] = None card_id: Optional[int] = None card_year: str | None + category: CardCategoryType purchase_price: Optional[condecimal(max_digits=10, decimal_places=2)] = None displayed: Optional[bool] = False diy_source: Optional[str] = None