[Bugfix] 修复资产重复的bug

pull/1194/head
ibuler 2018-04-12 11:07:40 +08:00
parent 2398e9acbd
commit ee4f5a8194
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ class Node(models.Model):
assets = Asset.objects.all() assets = Asset.objects.all()
else: else:
nodes = self.get_family() nodes = self.get_family()
assets = Asset.objects.filter(nodes__in=nodes) assets = Asset.objects.filter(nodes__in=nodes).distinct()
return assets return assets
def has_assets(self): def has_assets(self):