Commit 143fa060 authored by ibuler's avatar ibuler

[Update] 修改节点信息

parent 2c18a27e
...@@ -74,7 +74,7 @@ class AssetViewSet(IDInFilterMixin, LabelFilter, BulkModelViewSet): ...@@ -74,7 +74,7 @@ class AssetViewSet(IDInFilterMixin, LabelFilter, BulkModelViewSet):
.select_related('admin_user') .select_related('admin_user')
self.filter_admin_user_id() self.filter_admin_user_id()
self.filter_node() self.filter_node()
return self.queryset return self.queryset.distinct()
class AssetListUpdateApi(IDInFilterMixin, ListBulkCreateUpdateDestroyAPIView): class AssetListUpdateApi(IDInFilterMixin, ListBulkCreateUpdateDestroyAPIView):
......
...@@ -138,7 +138,7 @@ class Node(OrgModelMixin): ...@@ -138,7 +138,7 @@ class Node(OrgModelMixin):
args.append(Q(nodes__key__regex=pattern) | Q(nodes=None)) args.append(Q(nodes__key__regex=pattern) | Q(nodes=None))
else: else:
kwargs['nodes__key__regex'] = pattern kwargs['nodes__key__regex'] = pattern
assets = Asset.objects.filter(*args, **kwargs) assets = Asset.objects.filter(*args, **kwargs).distinct()
return assets return assets
def get_all_valid_assets(self): def get_all_valid_assets(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment