From b4090627df02a1b9173505c44232512c51ab1aa4 Mon Sep 17 00:00:00 2001 From: Hamid Reza Mohammadi Date: Thu, 26 May 2022 10:20:28 +0430 Subject: [PATCH] docs: #324 altering some obsolete code to adapt to changes --- .../GanjoorService-Partials/GanjoorService-DuplicateFinder.cs | 2 +- RMuseum/Services/Implementation/GanjoorService.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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();