mirror of https://github.com/jumpserver/jumpserver
不显示默认的group
parent
047dda5ab3
commit
c04237ac76
|
@ -34,9 +34,11 @@ def groups_str(username):
|
|||
group_default = UserGroup.objects.get(name=username)
|
||||
for group in user.user_group.all():
|
||||
groups.append(group.name)
|
||||
groups.remove(group_default)
|
||||
if group_default in groups:
|
||||
groups.remove(group_default)
|
||||
return ','.join(groups)
|
||||
|
||||
|
||||
@register.filter(name='get_item')
|
||||
def get_item(dictionary, key):
|
||||
return dictionary.get(key)
|
||||
|
|
Loading鈥
Reference in New Issue