2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-09 07:00:56 +00:00

Include supplier-part information in Stock API

This commit is contained in:
Oliver Walters
2020-04-06 22:02:23 +10:00
parent 5956b8cdee
commit 96547b885e
3 changed files with 20 additions and 1 deletions

View File

@ -71,6 +71,11 @@ class StockDetail(generics.RetrieveUpdateDestroyAPIView):
except AttributeError:
pass
try:
kwargs['supplier_detail'] = str2bool(self.request.GET.get('supplier_detail', False))
except AttributeError:
pass
kwargs['context'] = self.get_serializer_context()
return self.serializer_class(*args, **kwargs)