2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-13 08:21:26 +00:00

Custom list serializer for 'location_detail'

This commit is contained in:
Oliver Walters
2020-05-02 10:05:35 +10:00
parent a537b6df6e
commit 44319d24e4
3 changed files with 59 additions and 11 deletions

View File

@ -17,15 +17,12 @@ class LocationBriefSerializer(InvenTreeModelSerializer):
Provides a brief serializer for a StockLocation object
"""
url = serializers.CharField(source='get_absolute_url', read_only=True)
class Meta:
model = StockLocation
fields = [
'pk',
'name',
'pathstring',
'url',
]