diff --git a/Montage.Card.API/Entities/Impls/Setting.cs b/Montage.Card.API/Entities/Impls/Setting.cs index f774ed0..85e1c05 100644 --- a/Montage.Card.API/Entities/Impls/Setting.cs +++ b/Montage.Card.API/Entities/Impls/Setting.cs @@ -8,12 +8,12 @@ namespace Montage.Card.API.Entities.Impls { public class Setting { - public string Key { get; set; } - public string Value { get; set; } + public string? Key { get; set; } + public string? Value { get; set; } - public T GetValue() + public T? GetValue() { - return JsonSerializer.Deserialize(Value); + return JsonSerializer.Deserialize(Value ?? throw new NullReferenceException()); } public void SetValue(T value)