From 6ac2a56c6064387487c80824bd79d58dfef8622e Mon Sep 17 00:00:00 2001 From: Miku AuahDark Date: Sun, 15 Sep 2024 10:38:10 +0800 Subject: [PATCH] Remove unit list when deleting up user. --- npps4/system/user.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/npps4/system/user.py b/npps4/system/user.py index f6ba6a9..6b8b8a6 100644 --- a/npps4/system/user.py +++ b/npps4/system/user.py @@ -314,6 +314,8 @@ async def delete_user(context: idol.BasicSchoolIdolContext, user_id: int): ) await context.db.main.execute(q) + await _clean_table(context, main.Unit, user_id) + # Delete user await context.db.main.delete(user_data) await context.db.main.flush()