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
e5e7be7c
Commit
e5e7be7c
authored
May 07, 2020
by
Dave Nathanael
Browse files
[GREEN] Implement include_positive query param for InvestigationCase list
parent
b6a22a1b
Pipeline
#46152
passed with stages
in 8 minutes and 12 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
apps/cases/views.py
View file @
e5e7be7c
...
...
@@ -68,6 +68,9 @@ class InvestigationCaseViewSet(viewsets.ModelViewSet):
def
get_queryset
(
self
):
if
self
.
action
==
'list'
:
query_include_positive
=
self
.
request
.
query_params
.
get
(
'include_positive'
,
None
)
if
query_include_positive
is
not
None
:
return
self
.
queryset
return
self
.
queryset
.
filter
(
Q
(
outcome__isnull
=
True
)
|
Q
(
outcome__icontains
=
"-"
))
return
self
.
queryset
...
...
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