Skip to content

Commit

Permalink
BusinessProcessor.GetStatisticsAsync() - fixed possible null value fo…
Browse files Browse the repository at this point in the history
…r followers_unit.followers_delta_from_last_week (#194)
  • Loading branch information
estgold authored and ramtinak committed Feb 25, 2019
1 parent b0232a5 commit 9a6b7ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ public class InstaStatisticsFollowersUnitResponse
[JsonProperty("followers_unit_state")]
public string FollowersUnitState { get; set; }
[JsonProperty("followers_delta_from_last_week")]
public int FollowersDeltaFromLastWeek { get; set; }
public int? FollowersDeltaFromLastWeek { get; set; } = 0;
[JsonProperty("gender_graph")]
public InstaStatisticsDataPointsResponse GenderGraph { get; set; }
[JsonProperty("all_followers_age_graph")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public InstaStatistics Convert()
statisfics.BusinessManager.FollowersUnit = new InstaStatisticsFollowersUnit
{
FollowersUnitState = businessManager.FollowersUnit.FollowersUnitState,
FollowersDeltaFromLastWeek = businessManager.FollowersUnit.FollowersDeltaFromLastWeek
FollowersDeltaFromLastWeek = businessManager.FollowersUnit.FollowersDeltaFromLastWeek ?? default(int)
};
foreach (var dataPoint in businessManager.FollowersUnit.AllFollowersAgeGraph.DataPoints)
{
Expand Down

0 comments on commit 9a6b7ec

Please sign in to comment.