openslides_backend/action/actions/motion_category/number_motions.py
def sort_category_children(self, child_ids: List[int]) -> List[int]:
        """Sort the categories by weight. Important for the helper_affected_categories."""
        weighted_child_ids = []
        for id in child_ids:
            category = self.mem_categories.get(id, {})
            weighted_child_ids.append((category.get("weight"), id))
        weighted_child_ids.sort()
        return [id for (_, id) in weighted_child_ids]
Sort the categories by weight. Important for the helper_affected_categories.
Sort the categories by weight. Important for the helper_affected_categories.
Sort the categories by weight . Important for the helper_affected_categories .
def sort_category_children(self, child_ids: List[int]) -> List[int]:
        weighted_child_ids = []
        for id in child_ids:
            category = self.mem_categories.get(id, {})
            weighted_child_ids.append((category.get("weight"), id))
        weighted_child_ids.sort()
        return [id for (_, id) in weighted_child_ids]
def sort_category_children ( self , child_ids : List [ int ] ) -> List [ int ] : weighted_child_ids = [ ] for id in child_ids : category = self . mem_categories . get ( id , { } ) weighted_child_ids . append ( ( category . get ( "weight" ) , id ) ) weighted_child_ids . sort ( ) return [ id for ( _ , id ) in weighted_child_ids ]
Sort the categories by weight.
Sort the categories by weight .
"""Sort the categories by weight. Important for the helper_affected_categories."""
self
child_ids
List[int]