diff --git a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-DuplicateFinder.cs b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-DuplicateFinder.cs index d55f1fbe..998deabb 100644 --- a/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-DuplicateFinder.cs +++ b/RMuseum/Services/Implementation/GanjoorService-Partials/GanjoorService-DuplicateFinder.cs @@ -146,7 +146,7 @@ namespace RMuseum.Services.Implementation } context.UpdateRange(pins); - var similars = await context.GanjoorCachedRelatedPoems.Where(s => s.FullUrl == srcPoem.FullUrl).ToListAsync(); + var similars = await context.GanjoorCachedRelatedSections.Where(s => s.FullUrl.Contains(srcPoem.FullUrl)).ToListAsync(); context.RemoveRange(similars); var corrections = await context.GanjoorPoemCorrections.Include(c => c.VerseOrderText).Where(c => c.PoemId == srcPoem.Id).ToListAsync(); diff --git a/RMuseum/Services/Implementation/GanjoorService.cs b/RMuseum/Services/Implementation/GanjoorService.cs index 7961c6c4..20d01955 100644 --- a/RMuseum/Services/Implementation/GanjoorService.cs +++ b/RMuseum/Services/Implementation/GanjoorService.cs @@ -2918,7 +2918,7 @@ namespace RMuseum.Services.Implementation var music = await _context.GanjoorPoemMusicTracks.Where(m => m.PoemId == id).ToListAsync(); _context.RemoveRange(music); - var similars = await _context.GanjoorCachedRelatedPoems.Where(s => s.FullUrl == poem.FullUrl).ToListAsync(); + var similars = await _context.GanjoorCachedRelatedSections.Where(s => s.FullUrl.Contains(poem.FullUrl)).ToListAsync(); _context.RemoveRange(similars); var corrections = await _context.GanjoorPoemCorrections.Include(c => c.VerseOrderText).Where(c => c.PoemId == id).ToListAsync();