mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-30 15:37:55 +02:00
Fixed: Prevent delete of last profile
This commit is contained in:
@@ -46,7 +46,7 @@ namespace NzbDrone.Core.Profiles
|
||||
|
||||
public void Delete(int id)
|
||||
{
|
||||
if (_indexerFactory.All().Any(c => c.AppProfileId == id))
|
||||
if (_indexerFactory.All().Any(c => c.AppProfileId == id) || All().Count == 1)
|
||||
{
|
||||
throw new ProfileInUseException(id);
|
||||
}
|
||||
|
Reference in New Issue
Block a user