mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
Fix bug for BuildItem with no part image
- Can't request a field what don't exist
This commit is contained in:
parent
aff4124d97
commit
bb5ed0b9fe
@ -45,7 +45,7 @@ class BuildItemSerializer(InvenTreeModelSerializer):
|
|||||||
|
|
||||||
part = serializers.IntegerField(source='stock_item.part.pk', read_only=True)
|
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_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)
|
stock_item_detail = StockItemSerializerBrief(source='stock_item', read_only=True)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
Loading…
Reference in New Issue
Block a user