Fix avatar image in channel page

pull/681/head
Chocobozzz 2018-06-18 11:34:14 +02:00
parent 53055a1124
commit c305467cd7
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 8 additions and 1 deletions

View File

@ -15,6 +15,7 @@ import { ActorModel } from '../activitypub/actor'
import { getSort, throwIfNotValid } from '../utils'
import { VideoModel } from './video'
import { CONSTRAINTS_FIELDS } from '../../initializers'
import { AvatarModel } from '../avatar/avatar'
enum ScopeNames {
WITH_ACCOUNT = 'WITH_ACCOUNT',
@ -39,7 +40,13 @@ enum ScopeNames {
include: [
{
model: () => ActorModel.unscoped(),
required: true
required: true,
include: [
{
model: () => AvatarModel.unscoped(),
required: false
}
]
}
]
}