F 修复已删除用户所关联的角色无法被删除的问题

pull/59/head
vapao 2020-04-19 19:32:09 +08:00
parent 5e816be889
commit 65126c1e1f
1 changed files with 1 additions and 0 deletions

View File

@ -60,6 +60,7 @@ class UserView(View):
if user:
if user.type == 'ldap':
return json_response(error='ldap账户无法删除请使用禁用功能来禁止该账户访问系统')
user.role_id = None
user.deleted_at = human_datetime()
user.deleted_by = request.user
user.save()