mirror of
https://github.com/Cleanuparr/Cleanuparr.git
synced 2025-12-31 09:58:53 -05:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7d2ec7311 |
@@ -593,7 +593,10 @@ public class ConfigurationController : ControllerBase
|
||||
return BadRequest("Provider name is required");
|
||||
}
|
||||
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs.CountAsync(x => x.Name == updatedProvider.Name);
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs
|
||||
.Where(x => x.Id != id)
|
||||
.Where(x => x.Name == updatedProvider.Name)
|
||||
.CountAsync();
|
||||
|
||||
if (duplicateConfig > 0)
|
||||
{
|
||||
@@ -699,7 +702,10 @@ public class ConfigurationController : ControllerBase
|
||||
return BadRequest("Provider name is required");
|
||||
}
|
||||
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs.CountAsync(x => x.Name == updatedProvider.Name);
|
||||
var duplicateConfig = await _dataContext.NotificationConfigs
|
||||
.Where(x => x.Id != id)
|
||||
.Where(x => x.Name == updatedProvider.Name)
|
||||
.CountAsync();
|
||||
|
||||
if (duplicateConfig > 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user