Prevent being able to migrate entry to itself

This commit is contained in:
schroda
2026-06-05 14:52:12 +02:00
parent 848753022a
commit 09c04f4b62
5 changed files with 17 additions and 4 deletions

View File

@@ -819,7 +819,8 @@ export class MigrationManager {
);
const uniqueSearchResults = uniqBy('id', searchResults);
const matches = uniqueSearchResults.filter(
(searchMatch) => enhancedCleanup(searchMatch.title) === enhancedCleanup(mangaTitle),
(searchMatch) =>
searchMatch.id !== mangaId && enhancedCleanup(searchMatch.title) === enhancedCleanup(mangaTitle),
);
const matchUpdatePromises = matches.map(async (match) => {