From 39c8db08467e3af4d82d0afeab65690d84bb3b1b Mon Sep 17 00:00:00 2001 From: DLmaster361 Date: Mon, 1 Sep 2025 22:48:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=E5=9F=BA=E5=BB=BA?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E5=AE=9E?= =?UTF-8?q?=E9=99=85=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/core/config.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/core/config.py b/app/core/config.py index ceec572..b5a7b07 100644 --- a/app/core/config.py +++ b/app/core/config.py @@ -1186,6 +1186,8 @@ class AppConfig(GlobalConfig): logger.info(f"{script_id} - {user_id} 设置基建配置: {jsonFile}") + script_config = self.ScriptConfig[uuid.UUID(script_id)] + uid = uuid.UUID(user_id) json_path = Path(jsonFile) if not json_path.exists(): @@ -1200,6 +1202,9 @@ class AppConfig(GlobalConfig): / f"data/{script_id}/{user_id}/Infrastructure/infrastructure.json", ) + if isinstance(script_config, (MaaConfig)): + await script_config.UserData[uid].set("Info", "InfrastPath", str(json_path)) + async def add_plan( self, script: Literal["MaaPlan"] ) -> tuple[uuid.UUID, ConfigBase]: