mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-06 05:30:56 +00:00
More fixes
- Add a set of template tags for rendering status codes - Improve build API filtering - Remove some outdated files - Fix unit testing
This commit is contained in:
@ -38,7 +38,6 @@ class BuildList(generics.ListCreateAPIView):
|
||||
]
|
||||
|
||||
filter_fields = [
|
||||
'part',
|
||||
]
|
||||
|
||||
def get_queryset(self):
|
||||
@ -49,6 +48,12 @@ class BuildList(generics.ListCreateAPIView):
|
||||
|
||||
build_list = super().get_queryset()
|
||||
|
||||
# Filter by part
|
||||
part = self.request.query_params.get('part', None)
|
||||
|
||||
if part is not None:
|
||||
build_list = build_list.filter(part=part)
|
||||
|
||||
# Filter by build status?
|
||||
status = self.request.query_params.get('status', None)
|
||||
|
||||
|
Reference in New Issue
Block a user