From 477956ec305e375860e44302d5b7ee62d96776ab Mon Sep 17 00:00:00 2001 From: Wayne Witzel III Date: Mon, 15 May 2017 12:20:17 -0400 Subject: [PATCH] Add distinct to HostManager for DynamicFilter results --- awx/main/managers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/awx/main/managers.py b/awx/main/managers.py index fc99cbd7a4..0ce2068a14 100644 --- a/awx/main/managers.py +++ b/awx/main/managers.py @@ -41,7 +41,8 @@ class HostManager(models.Manager): # If we don't disable this, a filter of {'inventory': self.instance} gets automatically # injected by the related object mapper. self.core_filters = {} - return qs & q + qs = qs & q + return qs.distinct() return qs