Disable POST to v1 inventory_sources

This commit is contained in:
Jim Ladd
2017-07-24 14:32:13 -04:00
parent 8983351e99
commit deb8eaa982
2 changed files with 15 additions and 1 deletions
+7
View File
@@ -2532,6 +2532,13 @@ class InventorySourceList(ListCreateAPIView):
always_allow_superuser = False
new_in_320 = True
@property
def allowed_methods(self):
methods = super(InventorySourceList, self).allowed_methods
if get_request_version(self.request) == 1:
methods.remove('POST')
return methods
class InventorySourceDetail(RetrieveUpdateDestroyAPIView):