Fakultas Ilmu Komputer UI

Commit 434dc67a authored by KIANUTAMA RADIANUR HUDHA's avatar KIANUTAMA RADIANUR HUDHA
Browse files

fix backend issue not changing name when trying to update name

parent 730dad0d
Pipeline #26774 passed with stages
in 27 minutes and 47 seconds
......@@ -22,6 +22,10 @@ class CompanyViewSet(viewsets.ModelViewSet):
---
"""
user = self.get_object()
if 'name' in request.data:
user.user.first_name = request.data['name']
serializer = self.serializer_class(
user, data=request.data, partial=True)
if serializer.is_valid():
......
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