Allow manual updates in spite of update_on_project_update

This makes inventory sources with the that flag set behave
like any other inventory source with manual use.
They will still update when triggered by a project SCM
hash change.
This commit is contained in:
AlanCoding
2017-07-20 08:46:27 -04:00
parent 1c5b0f023e
commit f2d51f99dc
3 changed files with 2 additions and 43 deletions

View File

@@ -1874,8 +1874,7 @@ class RunInventoryUpdate(BaseTask):
source_project = None
if inventory_update.inventory_source:
source_project = inventory_update.inventory_source.source_project
if (inventory_update.source=='scm' and source_project and
not inventory_update.inventory_source.update_on_project_update):
if (inventory_update.source=='scm' and inventory_update.launch_type=='manual' and source_project):
request_id = '' if self.request.id is None else self.request.id
local_project_sync = source_project.create_project_update(
launch_type="sync",