mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-09 10:08:26 +00:00
修改bUg
This commit is contained in:
parent
fe70ca80e6
commit
1f15f13aac
@ -155,8 +155,8 @@ def get_user_host(username):
|
||||
hosts = {}
|
||||
try:
|
||||
user = User.objects.get(username=username)
|
||||
except AttributeError, ObjectDoesNotExist:
|
||||
red_print("Don't Use Root To Do That or User isn't Exist.")
|
||||
except ObjectDoesNotExist:
|
||||
return {'Error': 'username %s is not exist.' % username}
|
||||
else:
|
||||
perm_all = user.permission_set.all()
|
||||
for perm in perm_all:
|
||||
|
Loading…
Reference in New Issue
Block a user