component_name = 'main'
if section.find('/') != -1:
component_name = section.split('/', 1)[0]
- return session.query(Component).filter_by(component_name=component_name).one()
+ return get_mapped_component(component_name, session=session)
def source_component_func(db_source):
package_list = PackageList(db_source.proxy)
component = source_component_from_package_list(package_list, upload.target_suite)
if component is not None:
- return component
+ return get_mapped_component(component, session=session)
# Fallback for packages without Package-List field
query = session.query(Override).filter_by(suite=overridesuite, package=db_source.source) \