From 3edaf061b50cf3c83e6675b6b3ab2bb56e372b57 Mon Sep 17 00:00:00 2001 From: squaresmile Date: Wed, 13 Nov 2024 22:37:28 +0900 Subject: [PATCH] Revert "Use default item value in event trade eventPointItem" This reverts commit a881668f7d83a2802e50fda6445843b25d8c682a. --- app/core/nice/event/trade.py | 4 +--- app/schemas/nice.py | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/core/nice/event/trade.py b/app/core/nice/event/trade.py index c2e3e2a3..6f8a0134 100644 --- a/app/core/nice/event/trade.py +++ b/app/core/nice/event/trade.py @@ -49,9 +49,7 @@ def get_nice_trade_goods( gifts=get_nice_gifts(region, trade.giftId, gift_data), consumes=get_nice_common_consumes(raw_consumes, trade.commonConsumeId), eventPointNum=trade.eventPointNum, - eventPointItem=item_map.get( - trade.eventPointItemId, next(iter(item_map.values())) - ), + eventPointItem=item_map.get(trade.eventPointItemId, None), tradeTime=trade.tradeTime, maxNum=trade.maxNum, maxTradeTime=trade.maxTradeTime, diff --git a/app/schemas/nice.py b/app/schemas/nice.py index a911f767..01b25fe6 100644 --- a/app/schemas/nice.py +++ b/app/schemas/nice.py @@ -2165,7 +2165,7 @@ class NiceEventTradeGoods(BaseModelORJson): gifts: list[NiceGift] consumes: list[NiceCommonConsume] eventPointNum: int - eventPointItem: NiceItem + eventPointItem: NiceItem | None tradeTime: int maxNum: int maxTradeTime: int