Fixed shopping_list_id when adding products from /stockoverview to the shopping list (fixes #1442)

This commit is contained in:
Bernd Bestel 2021-06-27 20:46:21 +02:00
parent 5c3809aa33
commit 5153818b4e
No known key found for this signature in database
GPG Key ID: 71BD34C0D4891300
2 changed files with 4 additions and 0 deletions

View File

@ -1,4 +1,5 @@
<?php
namespace Grocy\Controllers;
use Grocy\Controllers\Users\User;

View File

@ -23,6 +23,9 @@ $('#save-shoppinglist-button').on('click', function(e)
jsonData.product_amount = jsonData.amount;
delete jsonData.amount;
jsonData.list_id = jsonData.shopping_list_id;
delete jsonData.shopping_list_id;
Grocy.Api.Post('stock/shoppinglist/add-product', jsonData,
function(result)
{