From 45bd143c07f1330a5ead288522569f28fe8aa12e Mon Sep 17 00:00:00 2001 From: John Westcott IV <32551173+john-westcott-iv@users.noreply.github.com> Date: Mon, 21 Mar 2022 14:04:47 -0400 Subject: [PATCH] Fixing import of projects issue due to local_path (#11889) --- awxkit/awxkit/api/pages/api.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awxkit/awxkit/api/pages/api.py b/awxkit/awxkit/api/pages/api.py index d1ea58cc98b1..9279e44a7359 100644 --- a/awxkit/awxkit/api/pages/api.py +++ b/awxkit/awxkit/api/pages/api.py @@ -245,6 +245,10 @@ def _import_list(self, endpoint, assets): # JTs have valid options for playbook names _page.wait_until_completed() else: + # If we are an existing project and our scm_tpye is not changing don't try and import the local_path setting + if asset['natural_key']['type'] == 'project' and 'local_path' in post_data and _page['scm_type'] == post_data['scm_type']: + del post_data['local_path'] + _page = _page.put(post_data) changed = True except (exc.Common, AssertionError) as e: