mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-13 18:55:34 +00:00
Fixes for double.tryParse
This commit is contained in:
@ -155,9 +155,8 @@ class QuantityField extends TextFormField {
|
||||
|
||||
if (value != null && value.isEmpty) return L10().quantityEmpty;
|
||||
|
||||
double quantity = double.tryParse(value ?? '0') ?? 0;
|
||||
double quantity = double.tryParse(value.toString()) ?? 0;
|
||||
|
||||
if (quantity == null) return L10().quantityInvalid;
|
||||
if (quantity <= 0) return L10().quantityPositive;
|
||||
if ((max != null) && (quantity > max)) return "Quantity must not exceed ${max}";
|
||||
|
||||
|
Reference in New Issue
Block a user