diff --git a/lib/inventree/stock.dart b/lib/inventree/stock.dart index f31da482..ace86d7f 100644 --- a/lib/inventree/stock.dart +++ b/lib/inventree/stock.dart @@ -479,8 +479,9 @@ class InvenTreeStockItem extends InvenTreeModel { } String get locationName { - if (locationId == -1 || !jsondata.containsKey("location_detail")) + if (locationId == -1 || !jsondata.containsKey("location_detail")) { return "Unknown Location"; + } String loc = getString("name", subKey: "location_detail"); @@ -493,8 +494,9 @@ class InvenTreeStockItem extends InvenTreeModel { } String get locationPathString { - if (locationId == -1 || !jsondata.containsKey("location_detail")) + if (locationId == -1 || !jsondata.containsKey("location_detail")) { return L10().locationNotSet; + } String _loc = getString("pathstring", subKey: "location_detail"); if (_loc.isNotEmpty) { diff --git a/lib/widget/fields.dart b/lib/widget/fields.dart index 80dc636d..cce1520d 100644 --- a/lib/widget/fields.dart +++ b/lib/widget/fields.dart @@ -199,8 +199,9 @@ class QuantityField extends TextFormField { double quantity = double.tryParse(value.toString()) ?? 0; if (quantity <= 0) return L10().quantityPositive; - if ((max != null) && (quantity > max)) + if ((max != null) && (quantity > max)) { return "Quantity must not exceed ${max}"; + } return null; },