1
0
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:
Robert Beekman 2021-06-08 20:39:29 +02:00 committed by GitHub
commit 7293d11aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);