mirror of
https://github.com/ansible/awx.git
synced 2026-01-11 10:00:01 -03:30
Fixes confusing Error when trying to sync project set to scm_type Manual (#13080)
Signed-off-by: darshanip <darshancoding@gmail.com> Co-authored-by: Rick Elrod <rick@elrod.me>
This commit is contained in:
parent
eba24db74c
commit
b19aa4a88d
@ -114,7 +114,12 @@ def main():
|
||||
# Update the project
|
||||
result = module.post_endpoint(project['related']['update'])
|
||||
|
||||
if result['status_code'] != 202:
|
||||
if result['status_code'] == 405:
|
||||
module.fail_json(
|
||||
msg="Unable to trigger a project update because the project scm_type ({0}) does not support it.".format(project['scm_type']),
|
||||
response=result
|
||||
)
|
||||
elif result['status_code'] != 202:
|
||||
module.fail_json(msg="Failed to update project, see response for details", response=result)
|
||||
|
||||
module.json_output['changed'] = True
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user