probable fix for section deletion bug

This commit is contained in:
Hamid Reza Mohammadi 2023-03-08 18:01:15 +03:30
parent 5c84067d29
commit 371fa941e2

View File

@ -735,7 +735,7 @@ namespace RMuseum.Services.Implementation
{
try
{
var section = await _context.GanjoorPoemSections.Where(s => s.PoemId == poemId && s.Index == sectionIndex).SingleOrDefaultAsync();
var section = await _context.GanjoorPoemSections.Where(s => s.PoemId == poemId && s.Index == sectionIndex ).FirstOrDefaultAsync();
if (section == null)
{
return new RServiceResult<bool>(false);//Not found