Fix regression when adding an non stackable item.
This commit is contained in:
parent
48a461396a
commit
9be8f2b209
1 changed files with 3 additions and 3 deletions
|
|
@ -86,9 +86,9 @@ class ItemDetailDialogViewModel(
|
|||
): Boolean {
|
||||
try {
|
||||
if (dialog.countable?.errorFlow?.value == true) return false
|
||||
val quantity = dialog.countable?.valueFlow?.value ?: return false
|
||||
val count = factory.parse(quantity = quantity)
|
||||
?: quantity.toFloatOrNull()
|
||||
val quantity = dialog.countable?.valueFlow?.value
|
||||
val count = factory.parse(quantity = quantity ?: "")
|
||||
?: quantity?.toFloatOrNull()
|
||||
?: 1f
|
||||
// create the inventory item on the server, get the newly create id from that.
|
||||
inventoryRepository.createInventoryItem(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue