田爽 hai 1 ano
pai
achega
b7352ca39b
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Hotline.Api/Controllers/KnowledgeController.cs

+ 1 - 1
src/Hotline.Api/Controllers/KnowledgeController.cs

@@ -196,7 +196,7 @@ namespace Hotline.Api.Controllers
 		{
 			var count = await _knowledgeRepository.Queryable()
 				.WhereIF(!string.IsNullOrEmpty(dto.Id), x => x.Id != dto.Id)
-				.Where(x => x.Title == dto.Title).CountAsync();
+				.Where(x => x.Title == dto.Title && x.Status == EKnowledgeStatus.OnShelf).CountAsync();
 			return count > 0;
 		}