Commit 0dd5e495 authored by okhin's avatar okhin

Fixing the feedback serializer

parent f3ab1469
Pipeline #841 passed with stages
in 46 seconds
......@@ -3,7 +3,7 @@ from rest_framework.response import Response
from import FeedbackSerializer
from import Feedback, FeedbackCategory
from picampaign.campaign.models import CampaignContact
from import Contact
class FeedbackViewSet(viewsets.ViewSet):
......@@ -14,5 +14,5 @@ class FeedbackViewSet(viewsets.ViewSet):
def create(self, request, campaign_pk=None):
serializer = FeedbackSerializer(
feedback = Feedback.objects.create(**serializer.validated_data)
feedback = Feedback.objects.create(callee=serializer.validated_data.pop('callee'), **serializer.validated_data)
return Response(
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment