MCPcopy Create free account
hub / github.com/aaPanel/BaoTa / remove_project_from_group

Method remove_project_from_group

mod/project/java/groupMod.py:846–857  ·  view source on GitHub ↗
(group_id: str, project_id: int)

Source from the content-addressed store, hash-verified

844
845 @staticmethod
846 def remove_project_from_group(group_id: str, project_id: int) -> Optional[str]:
847 g = Group(group_id)
848 if not g.config:
849 return "项目组不存在"
850 target_idx = None
851 for idx, p in enumerate(g.config["projects"]):
852 if p["id"] == project_id:
853 target_idx = idx
854 break
855 if target_idx is not None:
856 g.config["projects"].pop(target_idx)
857 g.save_group_data()
858
859 @staticmethod
860 def modify_group(group_id: str, group_data: dict) -> Optional[str]:

Callers

nothing calls this directly

Calls 3

save_group_dataMethod · 0.95
GroupClass · 0.70
popMethod · 0.45

Tested by

no test coverage detected