Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions backend/src/database/repositories/segmentRepository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,10 @@ class SegmentRepository extends RepositoryBase<
}

async fetchTenantActivityChannels(segmentIds: string[]) {
if (segmentIds.length === 0) {
return {}
}

const transaction = this.transaction

const records = await this.options.database.sequelize.query(
Expand Down
4 changes: 4 additions & 0 deletions backend/src/services/activityService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export default class ActivityService extends LoggerBase {

const subprojectIds = await getSegmentSubprojectIds(qx, currentSegments)

if (subprojectIds.length === 0) {
return {}
}

return SegmentService.getTenantActivityChannels(subprojectIds, this.options)
}

Expand Down
Loading