def deselect_package(package): with catalogue.modify(segment_path) as segment: remove_all(segment[package.project.id], package) environment.reload()
def select_package(package): with catalogue.modify(segment_path) as segment: segment[package.project.id].append(package) environment.reload()