From d3f59d4c88c0a9ef2809690bed9dcafc1db59f46 Mon Sep 17 00:00:00 2001 From: LeonspaceX Date: Mon, 20 Oct 2025 21:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=80=E4=BA=9B?= =?UTF-8?q?=E6=B3=A8=E9=87=8A=EF=BC=88=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api_server.py b/api_server.py index bffdb1e..034e267 100644 --- a/api_server.py +++ b/api_server.py @@ -758,7 +758,7 @@ def admin_del_post(): return jsonify({"status": "Fail", "reason": "Post not found"}), 404 try: - db.session.delete(submission) # 会级联删除所有 comments(你在 Submission 模型里有 cascade='all, delete-orphan') + db.session.delete(submission) db.session.commit() return jsonify({"status": "OK"}), 200 except Exception as e: