Merge pull request #5392 from ryanpetrello/fix-system-jobs

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

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-11-27 17:25:56 +00:00
committed by GitHub
10 changed files with 45 additions and 30 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