Fixed 'born in undefined' on actor tile.
This commit is contained in:
@@ -43,12 +43,14 @@ export function curateActor(actor, context = {}) {
|
||||
country: actor.birth_country_alpha2 && {
|
||||
alpha2: actor.birth_country_alpha2,
|
||||
name: actor.birth_country_name,
|
||||
alias: actor.birth_country_alias,
|
||||
},
|
||||
},
|
||||
residence: actor.residence_country_alpha2 && {
|
||||
country: actor.residence_country_alpha2 && {
|
||||
alpha2: actor.residence_country_alpha2,
|
||||
name: actor.residence_country_name,
|
||||
alias: actor.residence_country_alias,
|
||||
},
|
||||
},
|
||||
avatar: actor.avatar && {
|
||||
|
||||
@@ -109,10 +109,13 @@ export async function fetchScenesById(sceneIds, { reqUser, ...context } = {}) {
|
||||
.select(
|
||||
'actors.*',
|
||||
'actors_meta.*',
|
||||
'countries.name as birth_country_name',
|
||||
'countries.alias as birth_country_alias',
|
||||
'releases_actors.release_id',
|
||||
)
|
||||
.leftJoin('actors', 'actors.id', 'releases_actors.actor_id')
|
||||
.leftJoin('actors_meta', 'actors_meta.actor_id', 'actors.id')
|
||||
.leftJoin('countries', 'countries.alpha2', 'actors.birth_country_alpha2')
|
||||
.whereIn('release_id', sceneIds),
|
||||
directors: knex('releases_directors')
|
||||
.whereIn('release_id', sceneIds)
|
||||
|
||||
Reference in New Issue
Block a user