[Bugfix] 修复授权规则下Default节点下的资产不显示

pull/1946/head
BaiJiangJie 2018-10-24 12:13:47 +08:00
parent 54b6e06d1f
commit 41a8831034
1 changed files with 1 additions and 1 deletions

View File

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