fix: address final review findings in vendor-data removal (catalog save, job locking, DB collision, docs)

This commit is contained in:
aj
2026-08-01 09:32:16 -04:00
parent b77d0d971d
commit 3244e15593
4 changed files with 38 additions and 63 deletions
+12 -5
View File
@@ -302,14 +302,21 @@ else
return;
}
if (IsNew)
try
{
var created = await StockItemService.CreateAsync(stockItem);
Navigation.NavigateTo($"stock/{created.Id}");
if (IsNew)
{
var created = await StockItemService.CreateAsync(stockItem);
Navigation.NavigateTo($"stock/{created.Id}");
}
else
{
await StockItemService.UpdateAsync(stockItem);
}
}
else
catch (Microsoft.EntityFrameworkCore.DbUpdateException)
{
await StockItemService.UpdateAsync(stockItem);
errorMessage = "A stock item with this material and length already exists (it may have been previously deleted).";
}
}
finally