Skip to content

Commit

Permalink
Merge pull request ansible#1394 from AlanCoding/text_type2
Browse files Browse the repository at this point in the history
Prevent unicode bug in job_explanation
  • Loading branch information
AlanCoding committed Feb 28, 2018
2 parents ee0e239 + 54c0436 commit 4fba2d6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion awx/main/models/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,7 +533,8 @@ def cancel(self, job_explanation=None, is_chain=False):
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

'''
Expand Down

0 comments on commit 4fba2d6

Please sign in to comment.