Fix some invalid assumptions about hosts and jobs where we assume a job

template will always be available
This commit is contained in:
Matthew Jones
2014-06-23 13:39:09 -04:00
parent 788cf2e24e
commit 8d78755ef4
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -259,7 +259,7 @@ class Job(UnifiedJob, JobOptions):
def is_blocked_by(self, obj):
from awx.main.models import InventoryUpdate, ProjectUpdate
if type(obj) == Job:
if obj.job_template == self.job_template:
if obj.job_template is not None and obj.job_template == self.job_template:
if obj.launch_type == 'callback' and self.launch_type == 'callback':
if obj.limit != self.limit:
return False