mirror of https://github.com/jumpserver/jumpserver
[Bugfix] 修复授权规则下Default节点下的资产不显示
parent
54b6e06d1f
commit
41a8831034
|
@ -121,7 +121,7 @@ class Node(OrgModelMixin):
|
|||
def get_assets(self):
|
||||
from .asset import Asset
|
||||
if self.is_default_node():
|
||||
assets = Asset.objects.filter(nodes__isnull=True)
|
||||
assets = Asset.objects.filter(Q(nodes__id=self.id) | Q(nodes__isnull=True))
|
||||
else:
|
||||
assets = Asset.objects.filter(nodes__id=self.id)
|
||||
return assets
|
||||
|
|
Loading…
Reference in New Issue