Consolidate ATA also for tested media.

This commit is contained in:
2019-11-10 00:00:36 +00:00
parent 0467aab2e2
commit fd42b81b15

View File

@@ -2,6 +2,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using DiscImageChef.CommonTypes.Metadata;
using DiscImageChef.Decoders.ATA;
using DiscImageChef.Server.Models;
using Microsoft.AspNetCore.Authorization;
@@ -134,6 +135,11 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
atapiReport.ATAPIId = duplicate.Id;
}
foreach(TestedMedia testedMedia in _context.TestedMedia.Where(d => d.AtaId == duplicateId))
{
testedMedia.AtaId = duplicate.Id;
}
_context.Ata.Remove(_context.Ata.First(d => d.Id == duplicateId));
}
}