docs: #327 fixing bug for poem section corrections

This commit is contained in:
Hamid Reza Mohammadi 2022-06-26 19:59:37 +04:30
parent 6f1f2788a8
commit e573c02ff4

View File

@ -39,7 +39,7 @@ namespace RMuseum.Services.Implementation
dbCorrection.ReviewerUserId = userId;
dbCorrection.ReviewDate = DateTime.Now;
dbCorrection.ApplicationOrder = await _context.GanjoorPoemSectionCorrections.Where(c => c.Reviewed).AnyAsync() ? 1 + await _context.GanjoorPoemSectionCorrections.Where(c => c.Reviewed).MaxAsync(c => c.ApplicationOrder) : 1;
dbCorrection.Reviewed = true;
dbCorrection.AffectedThePoem = false;
dbCorrection.ReviewNote = moderation.ReviewNote;
@ -260,6 +260,7 @@ namespace RMuseum.Services.Implementation
await _context.SaveChangesAsync();
}
}
dbCorrection.Reviewed = true;
_context.GanjoorPoemSectionCorrections.Update(dbCorrection);
await _context.SaveChangesAsync();