mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 10:30:03 -03:30
Merge pull request #5972 from jainnikhil30/fix_smartinv_duplicate_hosts
fix smart inventory duplicate hosts Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
commit
c1bfcd73fb
@ -78,8 +78,7 @@ class HostManager(models.Manager):
|
||||
self.core_filters = {}
|
||||
|
||||
qs = qs & q
|
||||
unique_by_name = qs.order_by('name', 'pk').distinct('name')
|
||||
return qs.filter(pk__in=unique_by_name)
|
||||
return qs.order_by('name', 'pk').distinct('name')
|
||||
return qs
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user