poet's self quoted poems #474

This commit is contained in:
Hamid Reza Mohammadi 2025-03-13 12:10:11 +03:30
parent f4a4ddb9b3
commit 0d61d8cf04

View File

@ -854,6 +854,14 @@ namespace RMuseum.Services.Implementation
html += $"<ol>{Environment.NewLine}"; html += $"<ol>{Environment.NewLine}";
foreach (var quotedPoem in normalRelatedPoems) foreach (var quotedPoem in normalRelatedPoems)
{ {
if(
poetId == relatedPoetId
&&
normalRelatedPoems.Where(r => r.Id == Guid.Empty && r.PoemId == quotedPoem.RelatedPoemId && r.RelatedPoemId == quotedPoem.PoemId && r.CoupletIndex == quotedPoem.RelatedCoupletIndex).Any())
{
continue;
}
quotedPoem.Id = Guid.Empty;
var poem = await context.GanjoorPoems.AsNoTracking().Where(p => p.Id == quotedPoem.PoemId).SingleAsync(); var poem = await context.GanjoorPoems.AsNoTracking().Where(p => p.Id == quotedPoem.PoemId).SingleAsync();
html += $"<li>{Environment.NewLine}"; html += $"<li>{Environment.NewLine}";
html += $"<h3>{Environment.NewLine}"; html += $"<h3>{Environment.NewLine}";