mirror of https://github.com/jumpserver/jumpserver
[Update] Node get_all_assets 过滤游离资产,条件nodes_key=None -> nodes=None
parent
4ff7a1f066
commit
8f654c37a9
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue