Skip to content

Commit

Permalink
Fixes Setting.cs warning
Browse files Browse the repository at this point in the history
  • Loading branch information
ronelm2000 committed Oct 10, 2021
1 parent df5bf28 commit 8f53d4d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Montage.Card.API/Entities/Impls/Setting.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>()
public T? GetValue<T>()
{
return JsonSerializer.Deserialize<T>(Value);
return JsonSerializer.Deserialize<T>(Value ?? throw new NullReferenceException());
}

public void SetValue<T>(T value)
Expand Down

0 comments on commit 8f53d4d

Please sign in to comment.