Merge #498 Only check if a component is reusable from a previous module build with the same name and stream

This commit is contained in:
Jan Kaluža
2017-04-07 14:02:46 +00:00

View File

@@ -781,6 +781,7 @@ def get_reusable_component(session, module, component_name):
# Find the latest module that is in the done or ready state
previous_module_build = session.query(models.ModuleBuild)\
.filter_by(name=mmd.name)\
.filter_by(stream=mmd.stream)\
.filter(models.ModuleBuild.state.in_([3, 5]))\
.filter(models.ModuleBuild.scmurl.isnot(None))\
.order_by(models.ModuleBuild.time_completed.desc())\