mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 01:47:35 -02:30
Explicitly typecast self.pk.
This commit is contained in:
@@ -238,7 +238,7 @@ class Project(UnifiedJobTemplate, ProjectOptions):
|
|||||||
# Create auto-generated local path if project uses SCM.
|
# Create auto-generated local path if project uses SCM.
|
||||||
if self.pk and self.scm_type and not self.local_path.startswith('_'):
|
if self.pk and self.scm_type and not self.local_path.startswith('_'):
|
||||||
slug_name = slugify(unicode(self.name)).replace(u'-', u'_')
|
slug_name = slugify(unicode(self.name)).replace(u'-', u'_')
|
||||||
self.local_path = u'_%d__%s' % (self.pk, slug_name)
|
self.local_path = u'_%d__%s' % (int(self.pk), slug_name)
|
||||||
if 'local_path' not in update_fields:
|
if 'local_path' not in update_fields:
|
||||||
update_fields.append('local_path')
|
update_fields.append('local_path')
|
||||||
# Do the actual save.
|
# Do the actual save.
|
||||||
|
|||||||
Reference in New Issue
Block a user