class AssetsViewSet(viewsets.ModelViewSet):
    queryset = Assets.objects.using('gpr').all()

def create(self, request):
    assets = []
farming_details = {}
serializer = AssetsSerializer(data=request.data)
if serializer.is_valid():
    serializer.save()
return Response(serializer.data, status=status.HTTP_201_CREATED)
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
Get params validation on viewsets.ModelViewSet