review(bp): consistent dict key + log on empty seed

This commit is contained in:
gamer147
2026-05-26 22:02:37 -04:00
parent 95b8f39ea5
commit 8f07afce83

View File

@@ -14,9 +14,13 @@ public class BattlePassImporter
public async Task<int> ImportAsync(SVSimDbContext context, string seedDir)
{
var seed = SeedLoader.LoadList<BattlePassLevelSeed>(Path.Combine(seedDir, "battle-pass-levels.json"));
if (seed.Count == 0) return 0;
if (seed.Count == 0)
{
Console.WriteLine("[BattlePassImporter] No seed rows; skipping.");
return 0;
}
var existing = await context.BattlePassLevels.ToDictionaryAsync(e => e.Id);
var existing = await context.BattlePassLevels.ToDictionaryAsync(e => e.Level);
int created = 0, updated = 0;
foreach (var s in seed)
{