1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-01 08:21:15 +03:00

Proper type for in check

Still an __in for when we need to add another trigger obj
This commit is contained in:
Matthew Jones 2016-02-23 12:18:31 -05:00
parent 39c942e98b
commit 050ed8a200

View File

@ -1185,9 +1185,9 @@ class InventorySource(UnifiedJobTemplate, InventorySourceOptions):
def notifiers(self):
# Return all notifiers defined on the Project, and on the Organization for each trigger type
base_notifiers = Notifier.objects.filter(active=True)
error_notifiers = list(base_notifiers.filter(organization_notifiers_for_errors__in=self))
success_notifiers = list(base_notifiers.filter(organization_notifiers_for_success__in=self))
any_notifiers = list(base_notifiers.filter(organization_notifiers_for_any__in=self))
error_notifiers = list(base_notifiers.filter(organization_notifiers_for_errors__in=[self]))
success_notifiers = list(base_notifiers.filter(organization_notifiers_for_success__in=[self]))
any_notifiers = list(base_notifiers.filter(organization_notifiers_for_any__in=[self]))
return dict(error=error_notifiers, success=success_notifiers, any=any_notifiers)
def clean_source(self):