Commit f994bfcb authored by Aymeric Barantal's avatar Aymeric Barantal

use of model .objects to create new one is better

parent 9bc15758
......@@ -17,6 +17,5 @@ class FeedbackViewSet(viewsets.ViewSet):
category = FeedbackCategory.objects.get(id=request.DATA['category'])
serializer.data['callee'] = callee
serializer.data['category'] = category
feedback = Feedback(**serializer.data)
feedback.save()
feedback = Feedback.objects.create(**serializer.data)
return Response(feedback.id)
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