Deprecate post to v2 jobs (#18)

This commit is contained in:
Jim Ladd
2017-07-24 14:24:38 -04:00
committed by GitHub
parent 01316aebf7
commit 8983351e99
2 changed files with 16 additions and 0 deletions

View File

@@ -3719,6 +3719,13 @@ class JobList(ListCreateAPIView):
metadata_class = JobTypeMetadata
serializer_class = JobListSerializer
@property
def allowed_methods(self):
methods = super(JobList, self).allowed_methods
if get_request_version(self.request) > 1:
methods.remove('POST')
return methods
class JobDetail(RetrieveUpdateDestroyAPIView):