[Update] Node get_all_assets 过滤游离资产,条件nodes_key=None -> nodes=None

pull/1602/head
BaiJiangJie 2018-07-27 13:01:41 +08:00
parent 4ff7a1f066
commit 8f654c37a9
1 changed files with 1 additions and 1 deletions

View File

@ -114,7 +114,7 @@ class Node(OrgModelMixin):
args = [] args = []
kwargs = {} kwargs = {}
if self.is_default_node(): if self.is_default_node():
args.append(Q(nodes__key__regex=pattern) | Q(nodes__key=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)