Skip to content

Commit

Permalink
Fixing import of projects issue due to local_path (#11889)
Browse files Browse the repository at this point in the history
  • Loading branch information
john-westcott-iv committed Mar 21, 2022
1 parent aa46a7f commit 45bd143
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions awxkit/awxkit/api/pages/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 45bd143

Please sign in to comment.