Fixed actor ID property for newly created profiles, should fix actor association failing.

This commit is contained in:
DebaucheryLibrarian
2024-10-27 17:12:21 +01:00
parent 707c8170bd
commit d80ec2e6a6
3 changed files with 4 additions and 7 deletions

View File

@@ -850,7 +850,7 @@ async function getOrCreateActors(baseActors, batchId) {
.filter((actor) => actor.hasProfile)
.map((actor) => ({
...actor,
id: newActorIdsByEntityIdEntryIdAndSlug[actor.entity?.id]?.[actor.entryId]?.[actor.slug] || newActorIdsByEntityIdEntryIdAndSlug.null?.null?.[actor.slug],
actorId: newActorIdsByEntityIdEntryIdAndSlug[actor.entity?.id]?.[actor.entryId]?.[actor.slug] || newActorIdsByEntityIdEntryIdAndSlug.null?.null?.[actor.slug],
}))
.filter((actor) => !!actor.id)
.map((actor) => curateProfile(actor)));
@@ -935,8 +935,6 @@ async function associatePeople(releases, batchId, type = 'actor') {
return actors;
} catch (error) {
logger.error(`Failed to associate actors: ${error.message} ${error.stack}`);
logger.error(error);
console.log(error);
return [];
}