2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-18 13:05:42 +00:00

Added 'Pending' builds report to homepage, includes builds with 'Allocated' status

This commit is contained in:
eeintech
2020-09-17 14:36:05 -05:00
parent 28a55f0a58
commit 3d597cc3c3
7 changed files with 46 additions and 6 deletions

View File

@ -59,7 +59,10 @@ class BuildList(generics.ListCreateAPIView):
status = self.request.query_params.get('status', None)
if status is not None:
queryset = queryset.filter(status=status)
# Get status codes
codes = status.split('-')
# Filter by codes
queryset = queryset.filter(status__in=codes)
# Filter by associated part?
part = self.request.query_params.get('part', None)