Fixed API call AddProductToShoppingList

$productId->id was undefined, therefore all items added to the shopping list with the API call had a null entry for "product_id"
This commit is contained in:
Marc Ole Bulling 2019-09-24 15:05:48 +02:00 committed by GitHub
parent d8be254ff3
commit 2840e892ec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -592,7 +592,7 @@ class StockService extends BaseService
else // Insert else // Insert
{ {
$shoppinglistRow = $this->Database->shopping_list()->createRow(array( $shoppinglistRow = $this->Database->shopping_list()->createRow(array(
'product_id' => $productId->id, 'product_id' => $productId,
'amount' => $amount, 'amount' => $amount,
'shopping_list_id' => $listId 'shopping_list_id' => $listId
)); ));