fix a few bugs with the session and oauth2 cleanup scheduled jobs

see: https://github.com/ansible/tower/issues/3940
This commit is contained in:
Ryan Petrello
2019-11-25 11:50:09 -05:00
parent deb8714987
commit 632810f3a8
4 changed files with 30 additions and 20 deletions

View File

@@ -4664,6 +4664,10 @@ class ScheduleSerializer(LaunchConfigurationBaseSerializer, SchedulePreviewSeria
def get_summary_fields(self, obj):
summary_fields = super(ScheduleSerializer, self).get_summary_fields(obj)
if isinstance(obj.unified_job_template, SystemJobTemplate):
summary_fields['unified_job_template']['job_type'] = obj.unified_job_template.job_type
if 'inventory' in summary_fields:
return summary_fields