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
a81881ca
Commit
a81881ca
authored
Jun 04, 2020
by
Irwanto
Browse files
[REFACTOR] Change is_positive condition in case serializers
parent
ce8b6f62
Pipeline
#49472
passed with stages
in 2 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/cases/serializers.py
View file @
a81881ca
...
...
@@ -93,7 +93,7 @@ class InvestigationCaseSerializer(serializers.ModelSerializer):
outcome
=
self
.
validated_data
.
get
(
'outcome'
,
None
)
is_positive
=
None
if
outcome
is
not
None
:
is_positive
=
Tru
e
if
"
+
"
in
outcome
else
Fals
e
is_positive
=
Fals
e
if
"
-
"
in
outcome
else
Tru
e
super
(
InvestigationCaseSerializer
,
self
).
save
(
author
=
account
,
is_positive
=
is_positive
)
...
...
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