v2.4更新

This commit is contained in:
canglan committed 2026-05-29 11:12:13 +08:00
1 parent 122ffb4e0d
commit 6c0d8f0e94
12 files changed
+73 -33

No files matched your search

+2 -4
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: