From 7f669885a247b4fdfd607d0c80f906eaf027fb2f Mon Sep 17 00:00:00 2001 From: Timothy Baldridge Date: Wed, 22 Apr 2020 16:09:38 -0600 Subject: [PATCH] Fix broken ingest code --- Wabbajack.BuildServer/Controllers/NexusCache.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/Wabbajack.BuildServer/Controllers/NexusCache.cs b/Wabbajack.BuildServer/Controllers/NexusCache.cs index 3fc990c2..2dffd915 100644 --- a/Wabbajack.BuildServer/Controllers/NexusCache.cs +++ b/Wabbajack.BuildServer/Controllers/NexusCache.cs @@ -112,14 +112,18 @@ namespace Wabbajack.BuildServer.Controllers foreach (var record in data.ModInfos) { - await SQL.AddNexusModInfo(GameRegistry.GetByFuzzyName(record.Game).Game, record.ModId, + if (!GameRegistry.TryGetByFuzzyName(record.Game, out var game)) continue; + + await SQL.AddNexusModInfo(game.Game, record.ModId, record.LastCheckedUTC, record.Data); totalRows += 1; } foreach (var record in data.FileInfos) { - await SQL.AddNexusFileInfo(GameRegistry.GetByFuzzyName(record.Game).Game, record.ModId, + if (!GameRegistry.TryGetByFuzzyName(record.Game, out var game)) continue; + + await SQL.AddNexusFileInfo(game.Game, record.ModId, long.Parse(record.FileId), record.LastCheckedUTC, record.Data); totalRows += 1; @@ -127,7 +131,9 @@ namespace Wabbajack.BuildServer.Controllers foreach (var record in data.ModFiles) { - await SQL.AddNexusModFiles(GameRegistry.GetByFuzzyName(record.Game).Game, record.ModId, + if (!GameRegistry.TryGetByFuzzyName(record.Game, out var game)) continue; + + await SQL.AddNexusModFiles(game.Game, record.ModId, record.LastCheckedUTC, record.Data); totalRows += 1; }