Merge pull request #1394 from AlanCoding/text_type2

Prevent unicode bug in job_explanation
This commit is contained in:
Alan Rominger 2018-02-28 12:42:11 -05:00 committed by GitHub
commit 4fba2d61e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -533,7 +533,8 @@ class ProjectUpdate(UnifiedJob, ProjectOptions, JobNotificationMixin, TaskManage
res = super(ProjectUpdate, self).cancel(job_explanation=job_explanation, is_chain=is_chain)
if res and self.launch_type != 'sync':
for inv_src in self.scm_inventory_updates.filter(status='running'):
inv_src.cancel(job_explanation='Source project update `{}` was canceled.'.format(self.name))
inv_src.cancel(job_explanation=six.text_type(
'Source project update `{}` was canceled.').format(self.name))
return res
'''