mirror of
https://github.com/grocy/grocy.git
synced 2025-04-30 01:55:47 +00:00
Fixed shopping_list_id when adding products from /stockoverview to the shopping list (fixes #1442)
This commit is contained in:
parent
5c3809aa33
commit
5153818b4e
@ -1,4 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
namespace Grocy\Controllers;
|
namespace Grocy\Controllers;
|
||||||
|
|
||||||
use Grocy\Controllers\Users\User;
|
use Grocy\Controllers\Users\User;
|
||||||
|
@ -23,6 +23,9 @@ $('#save-shoppinglist-button').on('click', function(e)
|
|||||||
jsonData.product_amount = jsonData.amount;
|
jsonData.product_amount = jsonData.amount;
|
||||||
delete 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,
|
Grocy.Api.Post('stock/shoppinglist/add-product', jsonData,
|
||||||
function(result)
|
function(result)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user