Skip to content

Commit

Permalink
Use default item value in event trade eventPointItem
Browse files Browse the repository at this point in the history
  • Loading branch information
squaresmile committed Nov 13, 2024
1 parent c52c9cc commit a881668
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion app/core/nice/event/trade.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ 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, None),
eventPointItem=item_map.get(
trade.eventPointItemId, next(iter(item_map.values()))
),
tradeTime=trade.tradeTime,
maxNum=trade.maxNum,
maxTradeTime=trade.maxTradeTime,
Expand Down
2 changes: 1 addition & 1 deletion app/schemas/nice.py
Original file line number Diff line number Diff line change
Expand Up @@ -2165,7 +2165,7 @@ class NiceEventTradeGoods(BaseModelORJson):
gifts: list[NiceGift]
consumes: list[NiceCommonConsume]
eventPointNum: int
eventPointItem: NiceItem | None
eventPointItem: NiceItem
tradeTime: int
maxNum: int
maxTradeTime: int
Expand Down

0 comments on commit a881668

Please sign in to comment.