1
0
mirror of https://github.com/ansible/awx.git synced 2024-10-31 23:51:09 +03:00

Merge pull request #2266 from AlanCoding/no_cs_v1

Do not show create_schedule link in v1
This commit is contained in:
Ryan Petrello 2018-06-21 10:54:17 -04:00 committed by GitHub
commit 30e2207960
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3136,7 +3136,8 @@ class JobSerializer(UnifiedJobSerializer, JobOptionsSerializer):
)
except ObjectDoesNotExist:
pass
res['create_schedule'] = self.reverse('api:job_create_schedule', kwargs={'pk': obj.pk})
if self.version > 1:
res['create_schedule'] = self.reverse('api:job_create_schedule', kwargs={'pk': obj.pk})
res['relaunch'] = self.reverse('api:job_relaunch', kwargs={'pk': obj.pk})
return res