Point constructed inventory URL to special view (#13730)

This commit is contained in:
Alan Rominger 2023-03-21 14:54:03 -04:00 committed by Rick Elrod
parent be5a2bbe61
commit 62b79b1959

View File

@ -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')