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
Justika - Pengembangan Platform untuk UMKM
Justika UMKM Legal - Backend
Commits
1478abaf
Commit
1478abaf
authored
May 03, 2021
by
Shafiya Adzhani
Browse files
[REFACTOR] change status_filtered to status name variable
parent
3e9e1b05
Pipeline
#74482
passed with stages
in 2 minutes and 13 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
riwayat/views.py
View file @
1478abaf
...
...
@@ -9,11 +9,11 @@ from drf_multiple_model.pagination import MultipleModelLimitOffsetPagination
def
filter_status
(
queryset
,
request
,
*
args
,
**
kwargs
):
status
_filtered
=
request
.
query_params
.
get
(
"status"
)
status
=
request
.
query_params
.
get
(
"status"
)
if
status
_filtered
==
"Done"
:
if
status
==
"Done"
:
return
queryset
.
filter
(
status
=
"Done"
)
elif
status
_filtered
==
"Ongoing"
:
elif
status
==
"Ongoing"
:
return
queryset
.
exclude
(
status
=
"Done"
)
return
queryset
...
...
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