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