mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2026-10-03 19:00:00 +08:00
🎨 功能开关代码优化 (#1680)
* 🎨 功能开关代码优化 * chore(version): Update version to v0.2.3-5f361ff --------- Co-authored-by: HibiKier <HibiKier@users.noreply.github.com>
This commit is contained in:
@@ -133,7 +133,7 @@ async def build_task(group_id: str | None) -> BuildImage:
|
||||
task.id,
|
||||
task.module,
|
||||
task.name,
|
||||
"开启" if task.module not in group.block_task else "关闭",
|
||||
"开启" if f"<{task.module}," not in group.block_task else "关闭",
|
||||
"开启" if task.status else "关闭",
|
||||
task.run_time or "-",
|
||||
]
|
||||
@@ -214,9 +214,6 @@ class PluginManage:
|
||||
f"<{module},", ""
|
||||
)
|
||||
else:
|
||||
module_list = await PluginInfo.filter(
|
||||
plugin_type=PluginType.NORMAL
|
||||
).values_list("module", flat=True)
|
||||
module_list = [f"<{module}" for module in module_list]
|
||||
group.block_plugin = ",".join(module_list) + "," # type: ignore
|
||||
await group.save(update_fields=["block_plugin"])
|
||||
|
||||
Reference in New Issue
Block a user