[Update] 修改节点信息

pull/1922/head
ibuler 2018-10-16 13:44:26 +08:00
parent 2c18a27e3a
commit 143fa060d1
2 changed files with 2 additions and 2 deletions

View File

@ -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):

View File

@ -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):