mirror of https://github.com/jumpserver/jumpserver
[Update] 修改节点信息
parent
2c18a27e3a
commit
143fa060d1
|
@ -74,7 +74,7 @@ class AssetViewSet(IDInFilterMixin, LabelFilter, BulkModelViewSet):
|
|||
.select_related('admin_user')
|
||||
self.filter_admin_user_id()
|
||||
self.filter_node()
|
||||
return self.queryset
|
||||
return self.queryset.distinct()
|
||||
|
||||
|
||||
class AssetListUpdateApi(IDInFilterMixin, ListBulkCreateUpdateDestroyAPIView):
|
||||
|
|
|
@ -138,7 +138,7 @@ class Node(OrgModelMixin):
|
|||
args.append(Q(nodes__key__regex=pattern) | Q(nodes=None))
|
||||
else:
|
||||
kwargs['nodes__key__regex'] = pattern
|
||||
assets = Asset.objects.filter(*args, **kwargs)
|
||||
assets = Asset.objects.filter(*args, **kwargs).distinct()
|
||||
return assets
|
||||
|
||||
def get_all_valid_assets(self):
|
||||
|
|
Loading…
Reference in New Issue