Refactored to fix compiler warnings

This commit is contained in:
barelyprofessional
2025-07-07 20:12:07 -05:00
parent bcc3bde6c9
commit 5f189cb9cc
28 changed files with 279 additions and 228 deletions

View File

@@ -15,6 +15,11 @@ public static class SettingsProvider
if (!bypassCache && cache.Contains(key))
{
var cachedSetting = cache.Get(key) as SettingDbModel;
if (cachedSetting == null)
{
logger.Error($"Caught a null in spite of the cache supposedly containing {key}");
throw new Exception("Cached Setting entry was null");
}
var value = cachedSetting.Value;
if (cachedSetting.Value == "null") value = null;
return new Setting(value, cachedSetting, true);