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

This commit is contained in:
root
2015-05-14 18:02:20 +08:00
parent b134c90bfd
commit 49bee0c3fd
4 changed files with 5 additions and 1 deletions

View File

@@ -4,6 +4,8 @@ import ast
from django.db.models import Q
from django.template import RequestContext
from django.shortcuts import get_object_or_404
from jperm.models import Perm
from jumpserver.api import *
@@ -26,6 +28,8 @@ def get_host_groups(groups):
if group:
group = group[0]
ret.append(group)
group_all = get_object_or_404(BisGroup, name='ALL')
ret.append(group_all)
return ret