akvo.rsr.usecases.change_project_parent module
- akvo.rsr.usecases.change_project_parent.change_parent(project: Project, new_parent: Project, reimport=False, verbosity=0)[source]
Change the parent of a project to the specified new parent.
This function changes a project’s parent including its Result Framework objects by traversing up the hierarchy to find the nearest common ancestor then creates a binary lineage tree connecting the project and the new parent using the nearest common ancestor as root. Then, it uses the lineage tree connection to resolve each RF object’s new parent.