diff --git a/jumpserver/templatetags/mytags.py b/jumpserver/templatetags/mytags.py index b00016220..c603cfa0b 100644 --- a/jumpserver/templatetags/mytags.py +++ b/jumpserver/templatetags/mytags.py @@ -47,6 +47,7 @@ def bool2str(value): else: return u'否' + @register.filter(name='perm_count') def perm_count(user_id): user = User.objects.get(int(user_id)) diff --git a/templates/jperm/perm_host.html b/templates/jperm/perm_host.html index d2f8753b0..974c45fea 100644 --- a/templates/jperm/perm_host.html +++ b/templates/jperm/perm_host.html @@ -44,7 +44,7 @@ - {% for group in contacts.object_list %} + {% for user in contacts.object_list %} {{ user.username }} {{ user.name }}