Skip to content

Commit

Permalink
[#1078] Hide rejected data in the approved list
Browse files Browse the repository at this point in the history
  • Loading branch information
dedenbangkit committed Feb 5, 2024
1 parent beb556b commit e0b192e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion backend/api/v1/v1_data/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,12 @@ def list_pending_batch(request, version):
status=DataApprovalStatus.rejected
)
if approved:
queryset = queryset.filter(status=DataApprovalStatus.approved)
queryset = queryset.filter(
status=DataApprovalStatus.approved,
)
queryset = queryset.exclude(
batch_id__in=rejected.values_list('batch_id', flat=True)
)
else:
if subordinate:
queryset = queryset.filter(
Expand Down

0 comments on commit e0b192e

Please sign in to comment.