mirror of
https://github.com/ansible/awx.git
synced 2026-02-01 01:28:09 -03:30
Handle post to corrections by overriding post to not save the object. Work in progress.
This commit is contained in:
@@ -7,6 +7,8 @@ from django.core.exceptions import PermissionDenied
|
||||
from rest_framework import mixins
|
||||
from rest_framework import generics
|
||||
from rest_framework import permissions
|
||||
from rest_framework.response import Response
|
||||
from rest_framework import status
|
||||
import exceptions
|
||||
import datetime
|
||||
|
||||
@@ -153,6 +155,19 @@ class OrganizationsProjectsList(BaseList):
|
||||
teams__users__in = [ self.request.user.application_user ]
|
||||
).distinct()
|
||||
|
||||
def post(self, request, *args, **kwargs):
|
||||
|
||||
# FIXME: overriden post for add-to-collection
|
||||
# FIXME: if posted with disassociate: True, do not create object and remove the link
|
||||
# FIXME: verify permissions checks are in place
|
||||
# FIXME: do not create objects
|
||||
|
||||
project_id = request.DATA.get('pk')
|
||||
return Response('this is incomplete', status=status.HTTP_400_BAD_REQUEST)
|
||||
|
||||
|
||||
|
||||
|
||||
class OrganizationsTagsList(BaseList):
|
||||
# FIXME: guts & tests
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user