Skip to content

Commit

Permalink
Fixing null problems
Browse files Browse the repository at this point in the history
  • Loading branch information
mahomedalid committed Feb 23, 2024
1 parent 4cd2253 commit f992b8a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions RaccoonBitsCore/Db.cs
Original file line number Diff line number Diff line change
Expand Up @@ -187,11 +187,11 @@ public IEnumerable<Post> GetPosts(
{
string uri = reader["uri"]?.ToString() ?? string.Empty;
string jsonObject = reader["jsonObject"]?.ToString() ?? string.Empty;
double score = (double)reader["score"];
double wordsScore = Convert.ToDouble(reader["wordsScore"] ?? 0);
double buzzScore = (double)reader["buzzScore"];
double fameScore = (double)reader["fameScore"];
double hostScore = (double)reader["hostScore"];
double score = Convert.ToDouble(reader["score"]?.ToString() ?? "0");
double wordsScore = Convert.ToDouble(reader["wordsScore"]?.ToString() ?? "0");
double buzzScore = Convert.ToDouble(reader["buzzScore"]?.ToString() ?? "0");
double fameScore = Convert.ToDouble(reader["fameScore"]?.ToString() ?? "0");
double hostScore = Convert.ToDouble(reader["hostScore"]?.ToString() ?? "0");

var post = new Post(uri, jsonObject)
{
Expand All @@ -201,7 +201,7 @@ public IEnumerable<Post> GetPosts(
FameScore = fameScore,
HostScore = hostScore
};

if (processor != null)
{
post = processor.Process(post);
Expand Down

0 comments on commit f992b8a

Please sign in to comment.