Commit 41a88310 authored by BaiJiangJie's avatar BaiJiangJie

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

parent 54b6e06d
...@@ -121,7 +121,7 @@ class Node(OrgModelMixin): ...@@ -121,7 +121,7 @@ class Node(OrgModelMixin):
def get_assets(self): def get_assets(self):
from .asset import Asset from .asset import Asset
if self.is_default_node(): 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: else:
assets = Asset.objects.filter(nodes__id=self.id) assets = Asset.objects.filter(nodes__id=self.id)
return assets return assets
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment