Compare commits

..

No commits in common. "c66c7eaef79136697d7fbc208872891bf951c5f9" and "dae5ee098aa71661f1744cc096bbe35472cce2da" have entirely different histories.

1 changed files with 0 additions and 7 deletions

View File

@ -354,14 +354,7 @@ namespace IRaCIS.Core.Application.Service
[HttpPost("{id:guid}")] [HttpPost("{id:guid}")]
public async Task<IResponseOutput> DeleteCustomTag(Guid id) public async Task<IResponseOutput> DeleteCustomTag(Guid id)
{ {
if (await _readingTaskQuestionMarkRepository.AnyAsync(t => (t.Id == id || t.MarkId == id) && t.QuestionId != null))
{
throw new BusinessValidationFailedException(_localizer["ReadingCustomTag_CannotDelete"]);
}
var success = await _readingTaskQuestionMarkRepository.DeleteFromQueryAsync(t => t.Id == id||t.MarkId==id, true); var success = await _readingTaskQuestionMarkRepository.DeleteFromQueryAsync(t => t.Id == id||t.MarkId==id, true);
return ResponseOutput.Ok(); return ResponseOutput.Ok();
} }