Skip to content

Commit

Permalink
🐛 修正字段
Browse files Browse the repository at this point in the history
  • Loading branch information
HibiKier committed Feb 3, 2025
1 parent 8720ec9 commit d38c53c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions zhenxun/builtin_plugins/shop/_data_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ async def buy_prop(
if goods.uuid not in user.props:
user.props[goods.uuid] = 0
user.props[goods.uuid] += num
await user.save(update_Fields=["gold", "props"])
await user.save(update_fields=["gold", "props"])
return f"花费 {price} 金币购买 {goods.goods_name} ×{num} 成功!"

@classmethod
Expand All @@ -479,7 +479,7 @@ async def my_props(
is_change = True
del user.props[uuid]
if is_change:
await user.save(update_Fields=["props"])
await user.save(update_fields=["props"])
result = await GoodsInfo.filter(uuid__in=user.props.keys()).all()
data_list = []
uuid2goods = {item.uuid: item for item in result}
Expand Down

0 comments on commit d38c53c

Please sign in to comment.