fix for adding up unplublished recitations when comparing with MaxRecitationsPerPoem

This commit is contained in:
Hamid Reza Mohammadi 2023-05-05 08:29:06 +03:30
parent 2f7dad15c2
commit 03dd7ec3d4

View File

@ -896,7 +896,7 @@ namespace RMuseum.Services.Implementationa
else
{
bool overCrowdedPoem = false;
if (maxRecitationsPerPoem != 0 && maxRecitationsPerPoem <= (await context.Recitations.AsNoTracking().CountAsync(r => r.GanjoorPostId == audio.PoemId)))
if (maxRecitationsPerPoem != 0 && maxRecitationsPerPoem <= (await context.Recitations.AsNoTracking().CountAsync(r => r.GanjoorPostId == audio.PoemId && r.ReviewStatus == AudioReviewStatus.Approved)))
{
if
(