Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miss a Response in a function return #3

Open
nan1949 opened this issue Oct 7, 2021 · 1 comment
Open

Miss a Response in a function return #3

nan1949 opened this issue Oct 7, 2021 · 1 comment

Comments

@nan1949
Copy link

nan1949 commented Oct 7, 2021

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
@sushantdesaur
Copy link

return Response(serializer.data)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants