fix(task): 修复后端在零用户情况下index缺失引发的故障
This commit is contained in:
@@ -971,7 +971,11 @@ class MaaManager:
|
|||||||
if self.script_id in Config.if_ignore_silence:
|
if self.script_id in Config.if_ignore_silence:
|
||||||
Config.if_ignore_silence.remove(self.script_id)
|
Config.if_ignore_silence.remove(self.script_id)
|
||||||
|
|
||||||
if self.mode == "自动代理" and self.user_list[self.index]["status"] == "运行":
|
if (
|
||||||
|
self.mode == "自动代理"
|
||||||
|
and hasattr(self, "index")
|
||||||
|
and self.user_list[self.index]["status"] == "运行"
|
||||||
|
):
|
||||||
|
|
||||||
if not self.maa_update_package:
|
if not self.maa_update_package:
|
||||||
|
|
||||||
@@ -999,7 +1003,11 @@ class MaaManager:
|
|||||||
|
|
||||||
await self.result_record()
|
await self.result_record()
|
||||||
|
|
||||||
elif self.mode == "人工排查" and self.user_list[self.index]["status"] == "运行":
|
elif (
|
||||||
|
self.mode == "人工排查"
|
||||||
|
and hasattr(self, "index")
|
||||||
|
and self.user_list[self.index]["status"] == "运行"
|
||||||
|
):
|
||||||
|
|
||||||
await self.result_record()
|
await self.result_record()
|
||||||
|
|
||||||
|
|||||||
@@ -604,7 +604,11 @@ class GeneralManager:
|
|||||||
if self.check_result != "Success!":
|
if self.check_result != "Success!":
|
||||||
return self.check_result
|
return self.check_result
|
||||||
|
|
||||||
if self.mode == "自动代理" and self.user_list[self.index]["status"] == "运行":
|
if (
|
||||||
|
self.mode == "自动代理"
|
||||||
|
and hasattr(self, "index")
|
||||||
|
and self.user_list[self.index]["status"] == "运行"
|
||||||
|
):
|
||||||
|
|
||||||
self.general_result = "用户手动中止任务"
|
self.general_result = "用户手动中止任务"
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user