From 41c22f4314df61c3bd7f75d32c94a2d4d7835b73 Mon Sep 17 00:00:00 2001 From: HibiKier <775757368@qq.com> Date: Fri, 3 Jun 2022 01:14:34 +0800 Subject: [PATCH] fix ShopRegister --- README.md | 1 + utils/decorator/shop.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index ceb691a9..a1ac545e 100644 --- a/README.md +++ b/README.md @@ -247,6 +247,7 @@ __Docker 最新版本由 [Sakuracio](https://github.com/Sakuracio) 提供__ * 修复了webUI插件相关API问题 * 插件仓库在已安装插件边上会提示\[已安装] +* 修复ShopRegister kwargs某些字段无效 ### 2022/5/31 diff --git a/utils/decorator/shop.py b/utils/decorator/shop.py index b0ead367..154feb87 100644 --- a/utils/decorator/shop.py +++ b/utils/decorator/shop.py @@ -31,6 +31,8 @@ class ShopRegister(dict): for key, value in kwargs.items(): if key.startswith(f"{n}_"): _temp_kwargs[key.split("_", maxsplit=1)[-1]] = value + else: + _temp_kwargs[key] = value self._data[n] = { "price": p, "des": d,