broaden host job events list for both relationships

This commit is contained in:
AlanCoding 2017-01-28 16:05:52 -05:00
parent 0a5b037236
commit b2d1972976

View File

@ -3475,6 +3475,13 @@ class HostJobEventsList(BaseJobEventsList):
parent_model = Host
def get_queryset(self):
parent_obj = self.get_parent_object()
self.check_parent_access(parent_obj)
qs = self.request.user.get_queryset(self.model).filter(
Q(host=parent_obj) | Q(hosts=parent_obj)).distinct()
return qs
class GroupJobEventsList(BaseJobEventsList):