diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-18 11:34:14 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-18 11:34:14 +0200 |
commit | c305467cd784345b87703a98c2cc7f0f7d8ba196 (patch) | |
tree | a4905f6a113e3896fb9e5aed72e73cb58aab8e01 /server/models | |
parent | 53055a1124cbc2eaeeeeef21b19b0b46e96f23c5 (diff) | |
download | PeerTube-c305467cd784345b87703a98c2cc7f0f7d8ba196.tar.gz PeerTube-c305467cd784345b87703a98c2cc7f0f7d8ba196.tar.zst PeerTube-c305467cd784345b87703a98c2cc7f0f7d8ba196.zip |
Fix avatar image in channel page
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/video/video-channel.ts | 9 |
1 files changed, 8 insertions, 1 deletions
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' | |||
15 | import { getSort, throwIfNotValid } from '../utils' | 15 | import { getSort, throwIfNotValid } from '../utils' |
16 | import { VideoModel } from './video' | 16 | import { VideoModel } from './video' |
17 | import { CONSTRAINTS_FIELDS } from '../../initializers' | 17 | import { CONSTRAINTS_FIELDS } from '../../initializers' |
18 | import { AvatarModel } from '../avatar/avatar' | ||
18 | 19 | ||
19 | enum ScopeNames { | 20 | enum ScopeNames { |
20 | WITH_ACCOUNT = 'WITH_ACCOUNT', | 21 | WITH_ACCOUNT = 'WITH_ACCOUNT', |
@@ -39,7 +40,13 @@ enum ScopeNames { | |||
39 | include: [ | 40 | include: [ |
40 | { | 41 | { |
41 | model: () => ActorModel.unscoped(), | 42 | model: () => ActorModel.unscoped(), |
42 | required: true | 43 | required: true, |
44 | include: [ | ||
45 | { | ||
46 | model: () => AvatarModel.unscoped(), | ||
47 | required: false | ||
48 | } | ||
49 | ] | ||
43 | } | 50 | } |
44 | ] | 51 | ] |
45 | } | 52 | } |