Fakultas Ilmu Komputer UI

Commit da6ce204 authored by Irwanto's avatar Irwanto
Browse files

[CHORES] Add author when create account

parent 9abb2737
Pipeline #49451 failed with stages
in 15 minutes and 3 seconds
......@@ -73,7 +73,7 @@ class AccountViewSet(viewsets.ModelViewSet):
)
user = User.objects.create_user(username=username, password=password)
Account.objects.create(user=user, **serializer.validated_data)
Account.objects.create(user=user, author=self.request.user.account, **serializer.validated_data)
return Response(
serializer.data, status=status.HTTP_201_CREATED,
......
Supports Markdown
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