Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2020
PPL-C
PPTI-Mobile Apps Monitoring Wabah Tuberkolosis
Neza-Backend
Commits
da6ce204
Commit
da6ce204
authored
Jun 04, 2020
by
Irwanto
Browse files
[CHORES] Add author when create account
parent
9abb2737
Pipeline
#49451
failed with stages
in 15 minutes and 3 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/accounts/views.py
View file @
da6ce204
...
...
@@ -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
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment