Rename 'image_url' to 'thumbnail' in PartBrief API

This commit is contained in:
Oliver Walters 2020-04-06 12:57:04 +10:00
parent 535f1994b1
commit 92cb7211ce

View File

@ -47,7 +47,7 @@ class PartBriefSerializer(InvenTreeModelSerializer):
""" Serializer for Part (brief detail) """ """ Serializer for Part (brief detail) """
url = serializers.CharField(source='get_absolute_url', read_only=True) url = serializers.CharField(source='get_absolute_url', read_only=True)
image_url = serializers.CharField(source='get_thumbnail_url', read_only=True) thumbnail = serializers.CharField(source='get_thumbnail_url', read_only=True)
@staticmethod @staticmethod
def setup_eager_loading(queryset): def setup_eager_loading(queryset):
@ -66,7 +66,7 @@ class PartBriefSerializer(InvenTreeModelSerializer):
'description', 'description',
'total_stock', 'total_stock',
'available_stock', 'available_stock',
'image_url', 'thumbnail',
'active', 'active',
'assembly', 'assembly',
'virtual', 'virtual',