mirror of
https://github.com/ansible/awx.git
synced 2026-03-25 21:05:03 -02: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:
@@ -114,7 +114,12 @@ def main():
|
|||||||
# Update the project
|
# Update the project
|
||||||
result = module.post_endpoint(project['related']['update'])
|
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.fail_json(msg="Failed to update project, see response for details", response=result)
|
||||||
|
|
||||||
module.json_output['changed'] = True
|
module.json_output['changed'] = True
|
||||||
|
|||||||
Reference in New Issue
Block a user