fix(practice-opponents): guard duplicate ids + cover edge cases
This commit is contained in:
@@ -43,7 +43,12 @@ public class PracticeOpponentImporter
|
||||
entry.IsMaintenance = s.IsMaintenance;
|
||||
entry.IsCampaignPractice = s.IsCampaignPractice;
|
||||
|
||||
if (ex is null) { context.PracticeOpponents.Add(entry); created++; }
|
||||
if (ex is null)
|
||||
{
|
||||
context.PracticeOpponents.Add(entry);
|
||||
existing[s.PracticeId] = entry;
|
||||
created++;
|
||||
}
|
||||
else updated++;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user