mirror of https://github.com/jumpserver/jumpserver
fix(assets): 修复资产导入时填写节点引起的空节点名称的问题
parent
40c0aac5a9
commit
31cd441a34
|
@ -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:
|
||||
|
|
Loading…
Reference in New Issue