aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models
diff options
context:
space:
mode:
Diffstat (limited to 'server/models')
-rw-r--r--server/models/video/sql/comment/video-comment-list-query-builder.ts11
-rw-r--r--server/models/video/sql/comment/video-comment-table-attributes.ts2
2 files changed, 2 insertions, 11 deletions
diff --git a/server/models/video/sql/comment/video-comment-list-query-builder.ts b/server/models/video/sql/comment/video-comment-list-query-builder.ts
index f3f6910e1..49b41b6d8 100644
--- a/server/models/video/sql/comment/video-comment-list-query-builder.ts
+++ b/server/models/video/sql/comment/video-comment-list-query-builder.ts
@@ -87,8 +87,7 @@ export class VideoCommentListQueryBuilder extends AbstractRunQuery {
87 this.query = `${this.select} ` + 87 this.query = `${this.select} ` +
88 `FROM (${this.innerQuery}) AS "VideoCommentModel" ` + 88 `FROM (${this.innerQuery}) AS "VideoCommentModel" ` +
89 `${this.joins} ` + 89 `${this.joins} ` +
90 `${this.getOrder()} ` + 90 `${this.getOrder()}`
91 `${this.getLimit()}`
92 } 91 }
93 92
94 private buildInnerListQuery () { 93 private buildInnerListQuery () {
@@ -375,14 +374,6 @@ export class VideoCommentListQueryBuilder extends AbstractRunQuery {
375 return 'ORDER BY ' + orders.map(o => `"${o[0]}" ${o[1]}`).join(', ') 374 return 'ORDER BY ' + orders.map(o => `"${o[0]}" ${o[1]}`).join(', ')
376 } 375 }
377 376
378 private getLimit () {
379 if (!this.options.count) return ''
380
381 this.replacements.limit = this.options.count
382
383 return `LIMIT :limit `
384 }
385
386 private getInnerLimit () { 377 private getInnerLimit () {
387 if (!this.options.count) return '' 378 if (!this.options.count) return ''
388 379
diff --git a/server/models/video/sql/comment/video-comment-table-attributes.ts b/server/models/video/sql/comment/video-comment-table-attributes.ts
index 10e635e41..87f8750c1 100644
--- a/server/models/video/sql/comment/video-comment-table-attributes.ts
+++ b/server/models/video/sql/comment/video-comment-table-attributes.ts
@@ -38,6 +38,6 @@ export class VideoCommentTableAttributes {
38 38
39 @Memoize() 39 @Memoize()
40 getAvatarAttributes () { 40 getAvatarAttributes () {
41 return ActorImageModel.getSQLAttributes('Account->Actor->Avatars', 'Account.Actor.Avatars.id').join(', ') 41 return ActorImageModel.getSQLAttributes('Account->Actor->Avatars', 'Account.Actor.Avatars.').join(', ')
42 } 42 }
43} 43}