path entity pass is_group attribute and label to children entity

This commit is contained in:
iLLiCiTiT 2021-01-26 11:36:38 +01:00
parent 267d129962
commit ff477adc05

View file

@ -1084,8 +1084,9 @@ class PathEntity(ItemEntity):
return self.child_obj.items()
def item_initalization(self):
if not self.group_item and not self.is_group:
self.is_group = True
is_group = self.is_group
if not self.group_item and not is_group:
is_group = True
self.multiplatform = self.schema_data.get("multiplatform", False)
self.multipath = self.schema_data.get("multipath", False)
@ -1137,10 +1138,15 @@ class PathEntity(ItemEntity):
item_schema["children"].append(child_item)
self.child_obj = self.create_schema_object(item_schema, self)
self.valid_value_types = valid_value_types
if is_group:
self.is_group = False
item_schema["is_group"] = True
item_schema["label"] = self.schema_data["label"]
def get_child_path(self, child_obj):
self.valid_value_types = valid_value_types
self.child_obj = self.create_schema_object(item_schema, self)
def get_child_path(self, _child_obj):
return self.path
def set_value(self, value):