I
Size: a a a
I
DT
def create(self, request, *args, **kwargs):
client_id = request.data.pop('client')
client = Client.objects.get(user_id=client_id)
data = request.data
data['client'] = client.id
serializer = self.get_serializer(data=data)
serializer.is_valid(raise_exception=True)
self.perform_create(serializer)
headers = self.get_success_headers(serializer.data)
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
d
def create(self, request, *args, **kwargs):
client_id = request.data.pop('client')
client = Client.objects.get(user_id=client_id)
data = request.data
data['client'] = client.id
serializer = self.get_serializer(data=data)
serializer.is_valid(raise_exception=True)
self.perform_create(serializer)
headers = self.get_success_headers(serializer.data)
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
🔐
VT
BE
🔐
VT
🔐
VT
d
def create(self, request, *args, **kwargs):
client_id = request.data.pop('client')
client = Client.objects.get(user_id=client_id)
data = request.data
data['client'] = client.id
serializer = self.get_serializer(data=data)
serializer.is_valid(raise_exception=True)
self.perform_create(serializer)
headers = self.get_success_headers(serializer.data)
return Response(serializer.data, status=status.HTTP_201_CREATED, headers=headers)
🔐
VT
VT
🔐
🔐
🔐
VT
VT
🔐