Skip to content

Commit

Permalink
Merge branch 'master' of github.com:decentraland/builder-server into …
Browse files Browse the repository at this point in the history
…feat/add-virtual-third-parties
  • Loading branch information
LautaroPetaccio committed Sep 18, 2024
2 parents 7a44429 + 29ed092 commit b3de8f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Collection/Collection.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export class Collection extends Model<CollectionAttributes> {
Item.tableName
)}
WHERE items.collection_id = collections.id) as item_count,
(${SQL`${this.isMappingCompleteTableStatement()}`}) as is_mapping_complete
(${raw(this.isMappingCompleteTableStatement())}) as is_mapping_complete
FROM (
SELECT DISTINCT on (c.id) c.* FROM ${raw(Collection.tableName)} c
${SQL`${this.getPublishedJoinStatement(isPublished)}`}
Expand Down Expand Up @@ -289,7 +289,9 @@ export class Collection extends Model<CollectionAttributes> {

static findByIds(ids: string[]) {
return this.query<CollectionWithItemCount>(SQL`
SELECT *, (${SQL`${this.isMappingCompleteTableStatement()}`}) as is_mapping_complete, (SELECT COUNT(*) FROM ${raw(
SELECT *, (${raw(
this.isMappingCompleteTableStatement()
)}) as is_mapping_complete, (SELECT COUNT(*) FROM ${raw(
Item.tableName
)} WHERE items.collection_id = collections.id) as item_count
FROM ${raw(this.tableName)}
Expand Down

0 comments on commit b3de8f2

Please sign in to comment.