(group_id: str, project_id: int)
| 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]: |
nothing calls this directly
no test coverage detected