mirror of
https://github.com/inventree/InvenTree.git
synced 2025-07-02 03:30:54 +00:00
Fix BOM table rendering
- Price was not being sent in the PartBriefSerializer!
This commit is contained in:
@ -468,15 +468,15 @@ class BomList(generics.ListCreateAPIView):
|
||||
|
||||
# Do we wish to include extra detail?
|
||||
try:
|
||||
part_detail = str2bool(self.request.GET.get('part_detail', None))
|
||||
sub_part_detail = str2bool(self.request.GET.get('sub_part_detail', None))
|
||||
kwargs['part_detail'] = str2bool(self.request.GET.get('part_detail', None))
|
||||
except AttributeError:
|
||||
part_detail = None
|
||||
sub_part_detail = None
|
||||
|
||||
kwargs['part_detail'] = part_detail
|
||||
kwargs['sub_part_detail'] = sub_part_detail
|
||||
pass
|
||||
|
||||
try:
|
||||
kwargs['sub_part_detail'] = str2bool(self.request.GET.get('sub_part_detail', None))
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
# Ensure the request context is passed through!
|
||||
kwargs['context'] = self.get_serializer_context()
|
||||
|
||||
@ -486,6 +486,12 @@ class BomList(generics.ListCreateAPIView):
|
||||
queryset = BomItem.objects.all()
|
||||
queryset = self.get_serializer_class().setup_eager_loading(queryset)
|
||||
|
||||
return queryset
|
||||
|
||||
def filter_queryset(self, queryset):
|
||||
|
||||
query = super().filter_queryset(queryset)
|
||||
|
||||
# Filter by part?
|
||||
part = self.request.query_params.get('part', None)
|
||||
|
||||
|
Reference in New Issue
Block a user