Fakultas Ilmu Komputer UI

Commit e5e7be7c authored by Dave Nathanael's avatar 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
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment