From f444d3e095ec346cb57a42f7714c96a2a04fb10d Mon Sep 17 00:00:00 2001 From: Marc Ole Bulling Date: Tue, 24 Sep 2019 15:50:35 +0200 Subject: [PATCH] Fixed API call AddProductToShoppingList (#376) $productId->id was undefined, therefore all items added to the shopping list with the API call had a null entry for "product_id" --- services/StockService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/StockService.php b/services/StockService.php index 2c1889d8..258d5cc4 100644 --- a/services/StockService.php +++ b/services/StockService.php @@ -592,7 +592,7 @@ class StockService extends BaseService else // Insert { $shoppinglistRow = $this->Database->shopping_list()->createRow(array( - 'product_id' => $productId->id, + 'product_id' => $productId, 'amount' => $amount, 'shopping_list_id' => $listId ));