openslides_backend/action/actions/agenda_item/agenda_tree.py
def yield_items(
            items: Iterable[SerializedAgendaItem], parent_is_not_public: bool = False
        ) -> Iterable[SerializedAgendaItem]:
            """
            Generator that yields a list of items and their children.
            """
            for item in items:
                item_type = item.get("type", self.DEFAULT_AGENDA_ITEM_TYPE)
                if parent_is_not_public or item_type in (
                    AgendaItem.INTERNAL_ITEM,
                    AgendaItem.HIDDEN_ITEM,
                ):
                    item_is_not_public = True
                    yield item
                else:
                    item_is_not_public = False
                yield from yield_items(
                    item_children.get(item["id"], []),
                    parent_is_not_public=item_is_not_public,
                )

            Generator that yields a list of items and their children.
            
Generator that yields a list of items and their children.
Generator that yields a list of items and their children .
def yield_items(
            items: Iterable[SerializedAgendaItem], parent_is_not_public: bool = False
        ) -> Iterable[SerializedAgendaItem]:
            for item in items:
                item_type = item.get("type", self.DEFAULT_AGENDA_ITEM_TYPE)
                if parent_is_not_public or item_type in (
                    AgendaItem.INTERNAL_ITEM,
                    AgendaItem.HIDDEN_ITEM,
                ):
                    item_is_not_public = True
                    yield item
                else:
                    item_is_not_public = False
                yield from yield_items(
                    item_children.get(item["id"], []),
                    parent_is_not_public=item_is_not_public,
                )
def yield_items ( items : Iterable [ SerializedAgendaItem ] , parent_is_not_public : bool = False ) -> Iterable [ SerializedAgendaItem ] : for item in items : item_type = item . get ( "type" , self . DEFAULT_AGENDA_ITEM_TYPE ) if parent_is_not_public or item_type in ( AgendaItem . INTERNAL_ITEM , AgendaItem . HIDDEN_ITEM , ) : item_is_not_public = True yield item else : item_is_not_public = False yield from yield_items ( item_children . get ( item [ "id" ] , [ ] ) , parent_is_not_public = item_is_not_public , )
Generator that yields a list of items and their children.
Generator that yields a list of items and their children .
"""
            Generator that yields a list of items and their children.
            """
items
Iterable[SerializedAgendaItem]
parent_is_not_public
bool