From bb5ed0b9feb1bdc0fe5d64a04a7db8ba3696c23d Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Mon, 3 Jun 2019 21:25:37 +1000 Subject: [PATCH] Fix bug for BuildItem with no part image - Can't request a field what don't exist --- InvenTree/build/serializers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/build/serializers.py b/InvenTree/build/serializers.py index dd4a568187..a7bb61a5cc 100644 --- a/InvenTree/build/serializers.py +++ b/InvenTree/build/serializers.py @@ -45,7 +45,7 @@ class BuildItemSerializer(InvenTreeModelSerializer): part = serializers.IntegerField(source='stock_item.part.pk', read_only=True) part_name = serializers.CharField(source='stock_item.part.full_name', read_only=True) - part_image = serializers.CharField(source='stock_item.part.image.url', read_only=True) + part_image = serializers.CharField(source='stock_item.part.image', read_only=True) stock_item_detail = StockItemSerializerBrief(source='stock_item', read_only=True) class Meta: