Fixed release actor crash when no actors are present.
This commit is contained in:
parent
bf814c0b9d
commit
cdd4220cb9
|
@ -861,7 +861,7 @@ async function associateActors(releases, batchId) {
|
||||||
const baseActors = Object.values(baseActorsByReleaseId).flat();
|
const baseActors = Object.values(baseActorsByReleaseId).flat();
|
||||||
|
|
||||||
if (baseActors.length === 0) {
|
if (baseActors.length === 0) {
|
||||||
return null;
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
const baseActorsBySlug = baseActors.reduce((acc, baseActor) => ({
|
const baseActorsBySlug = baseActors.reduce((acc, baseActor) => ({
|
||||||
|
|
|
@ -321,7 +321,7 @@ async function storeScenes(releases) {
|
||||||
// media is more error-prone, associate separately
|
// media is more error-prone, associate separately
|
||||||
await associateReleaseMedia(releasesWithId);
|
await associateReleaseMedia(releasesWithId);
|
||||||
|
|
||||||
if (argv.sceneActors) {
|
if (argv.sceneActors && actors) {
|
||||||
await scrapeActors(actors.map(actor => actor.name));
|
await scrapeActors(actors.map(actor => actor.name));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue