mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-27 22:57:09 -04:00
Fixed: Prevent series from being added with an invalid Profile ID
Closes #977
This commit is contained in:
@@ -5,7 +5,7 @@ namespace NzbDrone.Core.Profiles
|
||||
{
|
||||
public interface IProfileRepository : IBasicRepository<Profile>
|
||||
{
|
||||
|
||||
bool Exists(int id);
|
||||
}
|
||||
|
||||
public class ProfileRepository : BasicRepository<Profile>, IProfileRepository
|
||||
@@ -14,5 +14,10 @@ namespace NzbDrone.Core.Profiles
|
||||
: base(database, eventAggregator)
|
||||
{
|
||||
}
|
||||
|
||||
public bool Exists(int id)
|
||||
{
|
||||
return DataMapper.Query<Profile>().Where(p => p.Id == id).GetRowCount() == 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user