1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

fix project sync revision bug

This commit is contained in:
AlanCoding 2019-09-05 08:49:52 -04:00
parent c819a78a4b
commit c65b77a20a
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -1895,8 +1895,8 @@ class RunProjectUpdate(BaseTask):
extra_vars.update(extra_vars_new) extra_vars.update(extra_vars_new)
scm_branch = project_update.scm_branch scm_branch = project_update.scm_branch
branch_override = bool(project_update.scm_branch != project_update.project.scm_branch) branch_override = bool(scm_branch and project_update.scm_branch != project_update.project.scm_branch)
if project_update.job_type == 'run' and scm_branch and (not branch_override): if project_update.job_type == 'run' and (not branch_override):
scm_branch = project_update.project.scm_revision scm_branch = project_update.project.scm_revision
elif not scm_branch: elif not scm_branch:
scm_branch = {'hg': 'tip'}.get(project_update.scm_type, 'HEAD') scm_branch = {'hg': 'tip'}.get(project_update.scm_type, 'HEAD')