diff --git a/apps/wpm/filters.py b/apps/wpm/filters.py index 03e08448..ec13f0ba 100644 --- a/apps/wpm/filters.py +++ b/apps/wpm/filters.py @@ -50,7 +50,7 @@ class WMaterialFilter(filters.FilterSet): process = Mgroup.objects.get(id=mgroup).process matoutIds = process.get_canout_mat_ids() if value == "todo": - qs = queryset.exclude(material__id__in=matoutIds)|queryset.filter(state=WMaterial.WM_REPAIR) + qs = queryset.exclude(material__id__in=matoutIds).exclude(state=WMaterial.WM_REPAIRED)|queryset.filter(state=WMaterial.WM_REPAIR) return qs elif value == "done": qs = queryset.filter(material__id__in=matoutIds).exclude(state=WMaterial.WM_REPAIR)|queryset.filter(state=WMaterial.WM_REPAIRED)