fix(assets): 修复资产导入时填写节点引起的空节点名称的问题

pull/5021/head
ibuler 2020-11-16 17:15:58 +08:00 committed by Jiangjie.Bai
parent 40c0aac5a9
commit 31cd441a34
1 changed files with 2 additions and 0 deletions

View File

@ -210,6 +210,7 @@ class FamilyMixin:
if not full_value:
return []
nodes_family = full_value.split('/')
nodes_family = [v for v in nodes_family if v]
org_root = cls.org_root()
if nodes_family[0] == org_root.value:
nodes_family = nodes_family[1:]
@ -217,6 +218,7 @@ class FamilyMixin:
@classmethod
def create_nodes_recurse(cls, values, parent=None):
values = [v for v in values if v]
if not values:
return None
if parent is None: