1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 15:21:13 +03:00

sometimes core_filters is not an attribute, so just set it to empty instead of pop

This commit is contained in:
Wayne Witzel III 2017-08-21 06:03:37 -04:00
parent eb6a27653f
commit f8c2b466a8
No known key found for this signature in database
GPG Key ID: B4F07BDC564D6301

View File

@ -40,7 +40,7 @@ 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.pop('inventory', None)
self.core_filters = {}
qs = qs & q
unique_by_name = qs.order_by('name', 'pk').distinct('name')