auto-sync: 2026-05-20 20:34:25
This commit is contained in:
@@ -171,17 +171,11 @@ class ProjectRegistry:
|
|||||||
)
|
)
|
||||||
|
|
||||||
def delete_project(self, project_id: str) -> bool:
|
def delete_project(self, project_id: str) -> bool:
|
||||||
"""删除项目(仅从注册表移除)"""
|
"""逻辑删除项目(status→deleted,不物理删除)"""
|
||||||
conn = self._connect()
|
return self.update_project(
|
||||||
try:
|
project_id,
|
||||||
conn.execute("BEGIN IMMEDIATE")
|
status="deleted",
|
||||||
cursor = conn.execute(
|
)
|
||||||
"DELETE FROM projects WHERE id=?", (project_id,)
|
|
||||||
)
|
|
||||||
conn.commit()
|
|
||||||
return cursor.rowcount > 0
|
|
||||||
finally:
|
|
||||||
conn.close()
|
|
||||||
|
|
||||||
# ===================================================================
|
# ===================================================================
|
||||||
# 自动发现
|
# 自动发现
|
||||||
|
|||||||
Reference in New Issue
Block a user