mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Add "pretty" name to the SupplierPart API
- Quick way to ensure the supplier part objects are printed the same way - Use the pythonic back-end to render the data
This commit is contained in:
@ -158,6 +158,11 @@ class SupplierPartList(generics.ListCreateAPIView):
|
||||
kwargs['manufacturer_detail'] = str2bool(self.request.query_params.get('manufacturer_detail', None))
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
try:
|
||||
kwargs['pretty'] = str2bool(self.request.query_params.get('pretty', None))
|
||||
except AttributeError:
|
||||
pass
|
||||
|
||||
kwargs['context'] = self.get_serializer_context()
|
||||
|
||||
|
Reference in New Issue
Block a user