From ba7f97f84bbfe83b26f3465011ca0e0278562ce9 Mon Sep 17 00:00:00 2001 From: John Westcott IV Date: Wed, 10 May 2023 14:24:27 -0400 Subject: Skip constructed_inventory endpoint in awxkit import --- awxkit/awxkit/api/pages/api.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'awxkit') 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 []) -- cgit v1.2.3