Fix Merge of Manga

This commit is contained in:
2025-07-22 17:59:25 +02:00
parent cb06cbbb61
commit 34b7d0c2a3
2 changed files with 7 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ using API.Workers;
using API.Workers.MaintenanceWorkers;
using log4net;
using log4net.Config;
using Microsoft.EntityFrameworkCore.ChangeTracking;
namespace API;
@@ -165,6 +166,10 @@ public static class Tranga
MangaConnectorId<Manga> mcId = context.MangaConnectorToManga.Find(addMcId.Key) ?? addMcId;
mcId.Obj = manga;
foreach (CollectionEntry collectionEntry in context.Entry(manga).Collections)
collectionEntry.Load();
context.Entry(manga).Navigation(nameof(Manga.Library)).Load();
IEnumerable<MangaTag> mergedTags = manga.MangaTags.Select(mt =>
{
MangaTag? inDb = context.Tags.Find(mt.Tag);