mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-02 02:11:19 +08:00
Do not ignore building components to reset state when submit an existing module build
koji.BUILD_STATE["BUILDING"] equals to 0. So, checking if component.state is None explicitly to avoid ignoring the components which are in building state. Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
@@ -975,7 +975,7 @@ def submit_module_build(db_session, username, mmd, params):
|
||||
log.debug("Resuming existing module build %r" % module)
|
||||
# Reset all component builds that didn't complete
|
||||
for component in module.component_builds:
|
||||
if component.state and component.state != koji.BUILD_STATES["COMPLETE"]:
|
||||
if component.state is not None and component.state != koji.BUILD_STATES["COMPLETE"]:
|
||||
component.state = None
|
||||
component.state_reason = None
|
||||
db_session.add(component)
|
||||
|
||||
Reference in New Issue
Block a user