From ca73ff0d35aeadaae16f2817046bf70e353227a8 Mon Sep 17 00:00:00 2001 From: Oliver Date: Thu, 5 Aug 2021 08:20:28 +1000 Subject: [PATCH] Catch null purchase_price --- lib/inventree/stock.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index c0b54b9c..2147bd05 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -221,8 +221,8 @@ class InvenTreeStockItem extends InvenTreeModel { int get status => jsondata['status'] ?? -1; int get partId => jsondata['part'] ?? -1; - - String get purchasePrice => jsondata['purchase_price']; + + String get purchasePrice => jsondata['purchase_price'] ?? ""; bool get hasPurchasePrice {