14 lines
362 B
Python
14 lines
362 B
Python
import typing
|
|
|
|
|
|
def get_all_distribution_child(distribution: object = None) -> typing.Any:
|
|
"""
|
|
get all child of an distribution
|
|
"""
|
|
descendants = []
|
|
children = distribution.children.all() # noqa
|
|
for child in children:
|
|
descendants.append(child)
|
|
descendants.extend(get_all_distribution_child(child))
|
|
return descendants
|