From 62b79b19594a24d6344384f0fc5774140085fabc Mon Sep 17 00:00:00 2001 From: Alan Rominger Date: Tue, 21 Mar 2023 14:54:03 -0400 Subject: [PATCH] Point constructed inventory URL to special view (#13730) --- awx/main/models/inventory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/awx/main/models/inventory.py b/awx/main/models/inventory.py index c8f609b2ca..6bc03190a2 100644 --- a/awx/main/models/inventory.py +++ b/awx/main/models/inventory.py @@ -206,6 +206,8 @@ class Inventory(CommonModelNameNotUnique, ResourceMixin, RelatedJobsMixin): ) def get_absolute_url(self, request=None): + if self.kind == 'constructed': + return reverse('api:constructed_inventory_detail', kwargs={'pk': self.pk}, request=request) return reverse('api:inventory_detail', kwargs={'pk': self.pk}, request=request) variables_dict = VarsDictProperty('variables')