Commit 49bee0c3 authored by root's avatar root

修改主机添加或者修改没添加进ALL组bug

parent b134c90b
File added
...@@ -4,6 +4,8 @@ import ast ...@@ -4,6 +4,8 @@ import ast
from django.db.models import Q from django.db.models import Q
from django.template import RequestContext from django.template import RequestContext
from django.shortcuts import get_object_or_404
from jperm.models import Perm from jperm.models import Perm
from jumpserver.api import * from jumpserver.api import *
...@@ -26,6 +28,8 @@ def get_host_groups(groups): ...@@ -26,6 +28,8 @@ def get_host_groups(groups):
if group: if group:
group = group[0] group = group[0]
ret.append(group) ret.append(group)
group_all = get_object_or_404(BisGroup, name='ALL')
ret.append(group_all)
return ret return ret
......
...@@ -23,7 +23,7 @@ root_pw = secret234 ...@@ -23,7 +23,7 @@ root_pw = secret234
[websocket] [websocket]
web_socket_host = 192.168.20.209:3000 web_socket_host = 192.168.8.66:3000
[mail] [mail]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment