File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed
Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change 88from common .core .sqlbot_cache import cache , clear_cache
99from common .utils .locale import I18n
1010from common .utils .utils import SQLBotLogUtil
11- from ..models .user import UserModel
11+ from ..models .user import UserModel , UserPlatformModel
1212from common .core .security import verify_md5pwd
1313import re
1414
@@ -69,6 +69,9 @@ async def single_delete(session: SessionDep, id: int):
6969 user_model : UserModel = get_db_user (session = session , user_id = id )
7070 del_stmt = sqlmodel_delete (UserWsModel ).where (UserWsModel .uid == id )
7171 session .exec (del_stmt )
72+ if user_model and user_model .origin and user_model .origin != 0 :
73+ platform_del_stmt = sqlmodel_delete (UserPlatformModel ).where (UserPlatformModel .uid == id )
74+ session .exec (platform_del_stmt )
7275 session .delete (user_model )
7376 session .commit ()
7477
You can’t perform that action at this time.
0 commit comments