mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Merge pull request #613 from Cheerpipe/development
Fixes duplicate category bypass exception
This commit is contained in:
commit
7293d11aa4
@ -41,6 +41,7 @@ namespace Artemis.Storage.Repositories
|
||||
|
||||
public ProfileCategoryEntity IsUnique(string name, Guid? id)
|
||||
{
|
||||
name = name.Trim();
|
||||
if (id == null)
|
||||
return _repository.FirstOrDefault<ProfileCategoryEntity>(p => p.Name == name);
|
||||
return _repository.FirstOrDefault<ProfileCategoryEntity>(p => p.Name == name && p.Id != id.Value);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user