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
+3 -4
View File
@@ -347,20 +347,17 @@ public class CatalogService
var existing = existingStockItems.FirstOrDefault(
s => s.LengthInches == dto.LengthInches);
StockItem stockItem;
if (existing != null)
{
existing.Name = dto.Name ?? existing.Name;
existing.Notes = dto.Notes ?? existing.Notes;
existing.IsActive = true;
existing.UpdatedAt = DateTime.UtcNow;
stockItem = existing;
result.StockItemsUpdated++;
}
else
{
stockItem = new StockItem
var stockItem = new StockItem
{
MaterialId = material.Id,
LengthInches = dto.LengthInches,
@@ -381,6 +378,8 @@ public class CatalogService
$"Stock item '{material.DisplayName} @ {dto.LengthInches}\"': {ex.Message}");
}
}
await context.SaveChangesAsync();
}
private static List<CatalogStockItemDto> MapStockItems(Material m)