mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 16:58:46 -03:30
Merge pull request #192 from AlanCoding/alan_bug
fix logger bug introduced in task except
This commit is contained in:
@@ -705,6 +705,8 @@ class Job(UnifiedJob, JobOptions, SurveyJobMixin, JobNotificationMixin, TaskMana
|
|||||||
JobNotificationMixin
|
JobNotificationMixin
|
||||||
'''
|
'''
|
||||||
def get_notification_templates(self):
|
def get_notification_templates(self):
|
||||||
|
if not self.job_template:
|
||||||
|
return NotificationTemplate.objects.none()
|
||||||
return self.job_template.notification_templates
|
return self.job_template.notification_templates
|
||||||
|
|
||||||
def get_notification_friendly_name(self):
|
def get_notification_friendly_name(self):
|
||||||
|
|||||||
@@ -350,7 +350,7 @@ def handle_work_error(self, task_id, subtasks=None):
|
|||||||
try:
|
try:
|
||||||
instance = UnifiedJob.get_instance_by_type(each_task['type'], each_task['id'])
|
instance = UnifiedJob.get_instance_by_type(each_task['type'], each_task['id'])
|
||||||
except ObjectDoesNotExist:
|
except ObjectDoesNotExist:
|
||||||
logger.warning('Missing {} `{}` in success callback.'.format(each_task['type'], task_actual['id']))
|
logger.warning('Missing {} `{}` in success callback.'.format(each_task['type'], each_task['id']))
|
||||||
instance = None
|
instance = None
|
||||||
if not instance:
|
if not instance:
|
||||||
# Unknown task type
|
# Unknown task type
|
||||||
|
|||||||
Reference in New Issue
Block a user