diff options
author | John Westcott IV <john.westcott.iv@redhat.com> | 2023-05-10 20:24:27 +0200 |
---|---|---|
committer | John Westcott IV <john.westcott.iv@redhat.com> | 2023-05-10 20:24:27 +0200 |
commit | ba7f97f84bbfe83b26f3465011ca0e0278562ce9 (patch) | |
tree | bc3a87dc145edf67e0f4069f4eab36555f1c7638 /awxkit | |
parent | Add error handling to scm_version.py script (#13521) (diff) | |
download | awx-ba7f97f84bbfe83b26f3465011ca0e0278562ce9.tar.xz awx-ba7f97f84bbfe83b26f3465011ca0e0278562ce9.zip |
Skip constructed_inventory endpoint in awxkit import
Diffstat (limited to 'awxkit')
-rw-r--r-- | awxkit/awxkit/api/pages/api.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/awxkit/awxkit/api/pages/api.py b/awxkit/awxkit/api/pages/api.py index 8a89cbb2ff..8ba64254ae 100644 --- a/awxkit/awxkit/api/pages/api.py +++ b/awxkit/awxkit/api/pages/api.py @@ -404,6 +404,11 @@ class ApiV2(base.Base): for resource in self._dependent_resources(): endpoint = getattr(self, resource) + # The /api/v2/constructed_inventories endpoint is for the UI but will register as an Inventory endpoint causing import issues, so skip it + if endpoint == '/api/v2/constructed_inventories/': + log.debug("Ignoring /api/v2/constructed_inventories/ endpoint.") + continue + # Load up existing objects, so that we can try to update or link to them self._cache.get_page(endpoint) imported = self._import_list(endpoint, data.get(resource) or []) |