Commit 23cceec6 authored by tidusjar's avatar tidusjar

Fixed potential null ref !wip

parent 7eb16e00
......@@ -715,7 +715,7 @@ namespace Ombi.Schedule.Jobs.Ombi
{
SeasonNumber = key,
Episodes = g.ToList(),
EpisodeAirDate = tvInfo.seasons.Where(x => x.season_number == key).Select(x => x.air_date)
EpisodeAirDate = tvInfo?.seasons?.Where(x => x.season_number == key)?.Select(x => x.air_date) ?? new List<string>()
}
);
......@@ -840,7 +840,7 @@ namespace Ombi.Schedule.Jobs.Ombi
{
SeasonNumber = key,
Episodes = g.ToList(),
EpisodeAirDate = tvInfo.seasons.Where(x => x.season_number == key).Select(x => x.air_date)
EpisodeAirDate = tvInfo?.seasons?.Where(x => x.season_number == key)?.Select(x => x.air_date) ?? new List<string>()
}
);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment