mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-20 13:33:34 -07:00
added quality size repo fixture
This commit is contained in:
parent
cc88840cf2
commit
cc0ed59e7b
3 changed files with 52 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.Data;
|
||||
using System;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using NzbDrone.Common.Messaging;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
@ -19,7 +20,14 @@ namespace NzbDrone.Core.Qualities
|
|||
|
||||
public QualitySize GetByQualityId(int qualityId)
|
||||
{
|
||||
return Query.Single(q => q.QualityId == qualityId);
|
||||
try
|
||||
{
|
||||
return Query.Single(q => q.QualityId == qualityId);
|
||||
}
|
||||
catch (InvalidOperationException e)
|
||||
{
|
||||
throw new InvalidOperationException("Sequence contains no element with qualityId = " + qualityId.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue