Blow up if series stats is null

pull/4/head
Mark McDowall 11 years ago
parent 13fab38702
commit c3b8b52644

@ -125,8 +125,7 @@ namespace NzbDrone.Api.Series
private void LinkSeriesStatistics(SeriesResource resource, List<SeriesStatistics> seriesStatistics) private void LinkSeriesStatistics(SeriesResource resource, List<SeriesStatistics> seriesStatistics)
{ {
var stats = seriesStatistics.SingleOrDefault(ss => ss.SeriesId == resource.Id); var stats = seriesStatistics.Single(ss => ss.SeriesId == resource.Id);
if (stats == null) return;
resource.EpisodeCount = stats.EpisodeCount; resource.EpisodeCount = stats.EpisodeCount;
resource.EpisodeFileCount = stats.EpisodeFileCount; resource.EpisodeFileCount = stats.EpisodeFileCount;

Loading…
Cancel
Save