Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
2021
Kelas D
PT Gizi Sehat - Dietela
Dietela Backend
Commits
cf47627e
Commit
cf47627e
authored
May 29, 2021
by
Glenda Emanuella Sutanto
Browse files
[REFACTOR] Added cart_id in auth user serializer
parent
1085a3de
Pipeline
#79292
passed with stages
in 23 minutes and 51 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
authentication/serializers.py
View file @
cf47627e
...
...
@@ -25,8 +25,10 @@ class UserAuthSerializer(serializers.ModelSerializer):
if
instance
.
cart
.
exists
():
result
[
'transaction_status'
]
=
instance
.
cart
.
last
().
transaction_status
result
[
'cart_id'
]
=
instance
.
cart
.
last
().
id
else
:
result
[
'transaction_status'
]
=
None
result
[
'cart_id'
]
=
None
return
result
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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