From: Chocobozzz Date: Mon, 18 Jun 2018 09:34:14 +0000 (+0200) Subject: Fix avatar image in channel page X-Git-Tag: v1.0.0-beta.9~22 X-Git-Url: https://git.immae.eu/?a=commitdiff_plain;h=c305467cd784345b87703a98c2cc7f0f7d8ba196;p=github%2FChocobozzz%2FPeerTube.git Fix avatar image in channel page --- diff --git a/server/models/video/video-channel.ts b/server/models/video/video-channel.ts index a65a03e38..4251afce9 100644 --- a/server/models/video/video-channel.ts +++ b/server/models/video/video-channel.ts @@ -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 + } + ] } ] }