From 41a88310349d297cb12abfce1940ad8ec771c77e Mon Sep 17 00:00:00 2001 From: BaiJiangJie Date: Wed, 24 Oct 2018 12:13:47 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20=E4=BF=AE=E5=A4=8D=E6=8E=88=E6=9D=83?= =?UTF-8?q?=E8=A7=84=E5=88=99=E4=B8=8BDefault=E8=8A=82=E7=82=B9=E4=B8=8B?= =?UTF-8?q?=E7=9A=84=E8=B5=84=E4=BA=A7=E4=B8=8D=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/assets/models/node.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/assets/models/node.py b/apps/assets/models/node.py index 8876fc2f1..c157d9d58 100644 --- a/apps/assets/models/node.py +++ b/apps/assets/models/node.py @@ -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