Fixed: Support the old broken functionality in GetValueEnum

(cherry picked from commit 2c4e1be12ad5e3b8362f83b8185c143f8e66062b)

Fixes #1602
This commit is contained in:
Bogdan 2023-04-11 21:22:29 +03:00
parent ea24a81ef7
commit 065fbb30bf

View file

@ -259,7 +259,7 @@ namespace NzbDrone.Core.Configuration
public T GetValueEnum<T>(string key, T defaultValue, bool persist = true)
{
return (T)Enum.Parse(typeof(T), GetValue(key, defaultValue, persist));
return (T)Enum.Parse(typeof(T), GetValue(key, defaultValue, persist), true);
}
public string GetValue(string key, object defaultValue, bool persist = true)