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

deprecate jobs creation via sublist

This commit is contained in:
AlanCoding 2018-04-06 12:59:53 -04:00
parent 675920efb6
commit 5a380b4437
No known key found for this signature in database
GPG Key ID: FD2C3C012A72926B

View File

@ -3476,6 +3476,13 @@ class JobTemplateJobsList(SubListCreateAPIView):
relationship = 'jobs'
parent_key = 'job_template'
@property
def allowed_methods(self):
methods = super(JobTemplateJobsList, self).allowed_methods
if get_request_version(getattr(self, 'request', None)) > 1:
methods.remove('POST')
return methods
class JobTemplateInstanceGroupsList(SubListAttachDetachAPIView):