Skip to content

Commit

Permalink
Remove unit list when deleting up user.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikuAuahDark committed Sep 15, 2024
1 parent c114ce3 commit 6ac2a56
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions npps4/system/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit 6ac2a56

Please sign in to comment.