Skip to content

Commit

Permalink
change failCount to be assigned a constant value instead of increment…
Browse files Browse the repository at this point in the history
…ing it
  • Loading branch information
slubwama committed Feb 13, 2024
1 parent ae5b7e1 commit 846bc4c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions owa/src/features/stockItems/Edit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ export const Edit = () => {
await (!uom.uuid ? createStockItemPackagingUnit(uom) : updateStockItemPackagingUnit({ model: uom, uuid: uom.uuid! })).unwrap().then(
(payload: any) => {
if ((payload as any).error) {
failCount += 1;
failCount = 1;
var errorToken = toErrorMessage(payload);
errorAlert(`${t(editableModel.uuid == null ? "stockmanagement.stockitem.packagingunitcreatefailed" : "stockmanagement.stockitem.packagingunitupdatefailed")} ${errorToken}`);
return;
Expand Down Expand Up @@ -643,7 +643,7 @@ export const Edit = () => {
await (!stockItemReference.uuid ? createStockItemReference(stockItemReference) : updateStockItemReference({ model: stockItemReference, uuid: stockItemReference.uuid! })).unwrap().then(
(payload: any) => {
if ((payload as any).error) {
failCount += 1;
failCount = 1;
var errorToken = toErrorMessage(payload);
errorAlert(`${t(editableModel.uuid == null ? "stockmanagement.stockitem.referencecreatefailed" : "stockmanagement.stockitem.referenceupdatefailed")} ${errorToken}`);
return;
Expand Down

0 comments on commit 846bc4c

Please sign in to comment.