review(bp): consistent dict key + log on empty seed
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user