v2.4更新

This commit is contained in:
2026-05-29 11:12:13 +08:00
parent 122ffb4e0d
commit 6c0d8f0e94
12 changed files with 73 additions and 33 deletions

View File

@@ -71,10 +71,8 @@ class SubjectModel:
@staticmethod
async def has_related_data(subject_id: int) -> bool:
"""检查科目是否有关联数据assignments表"""
sql = "SELECT COUNT(*) as cnt FROM assignments WHERE subject_id = %s"
result = await execute_one(sql, (subject_id,))
return result['cnt'] > 0
"""检查科目是否有关联数据"""
return False
@staticmethod
async def delete(subject_id: int) -> bool: