fix: remove duplicates from vobj.children

This commit is contained in:
relikd
2022-12-22 00:18:25 +01:00
parent b603fb9dd2
commit 1188216788
3 changed files with 6 additions and 5 deletions

View File

@@ -49,9 +49,9 @@ class VGroups:
*,
fields: Union[str, Iterable[str], None] = None,
flows: Union[str, Iterable[str], None] = None,
order_by: Union[str, Iterable[str], None] = None,
recursive: bool = True,
unique: bool = True,
order_by: Union[str, Iterable[str], None] = None,
) -> Iterator['GroupBySource']:
''' Extract all referencing groupby virtual objects from a page. '''
# prepare filter

View File

@@ -46,7 +46,7 @@ class GroupBySource(VirtualSourceObject):
self.page_num = page_num
def append_child(self, child: 'Record', key_obj: Any) -> None:
if child not in self.__children:
if child.path not in self.__children:
self.__children.append(child.path)
# __key_obj_map is later used to find most used key_obj
self.__key_obj_map.append(key_obj)