mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Fixed missing error message when trying to create a duplicate product
This commit is contained in:
parent
ea9722bfa4
commit
c121c0483a
@ -87,7 +87,12 @@ $('.save-product-button').on('click', function(e)
|
|||||||
if (Grocy.EditMode == 'create')
|
if (Grocy.EditMode == 'create')
|
||||||
{
|
{
|
||||||
Grocy.Api.Post('objects/products', jsonData,
|
Grocy.Api.Post('objects/products', jsonData,
|
||||||
(result) => saveProductPicture(result, location, jsonData));
|
(result) => saveProductPicture(result, location, jsonData),
|
||||||
|
(xhr) =>
|
||||||
|
{
|
||||||
|
Grocy.FrontendHelpers.EndUiBusy("product-form");
|
||||||
|
Grocy.FrontendHelpers.ShowGenericError('Error while saving, probably this item already exists', xhr.response)
|
||||||
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user