[Update] 优化资产

pull/2882/head^2
ibuler 2019-07-04 16:41:25 +08:00
parent bf9a2714d3
commit dc4ee2f0fa
1 changed files with 4 additions and 1 deletions

View File

@ -78,10 +78,13 @@ class AdminUserDetailView(PermissionsMixin, DetailView):
permission_classes = [IsOrgAdmin]
def get_context_data(self, **kwargs):
from ..utils import NodeUtil
nodes = Node.objects.all()
util = NodeUtil()
context = {
'app': _('Assets'),
'action': _('Admin user detail'),
'nodes': Node.objects.all()
'nodes': util.get_nodes_by_queryset(queryset=nodes),
}
kwargs.update(context)
return super().get_context_data(**kwargs)