divanov11/Django-React-NotesApp

Miss a Response in a function return

nan1949 opened this issue · 1 comments

api/utils

def updateNote(request, pk):
data = request.data
note = Note.objects.get(id=pk)
serializer = NoteSerializer(instance=note, data=data)

if serializer.is_valid():
    serializer.save()

return serializer.data
return Response(serializer.data)