Skip to content

Commit

Permalink
Lift the tenant check for mirrored entries
Browse files Browse the repository at this point in the history
  • Loading branch information
bt4R9 committed Dec 8, 2023
1 parent 9d25fa0 commit 8731f5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/services/new/collection/utils/get-parents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface GetCollectionParentIds extends Ctx {
}

export const getParents = async ({ctx, trx, collectionIds}: GetCollectionsParentIds) => {
const {tenantId, projectId} = ctx.get('info');
const {tenantId, projectId, onlyMirrored} = ctx.get('info');

const targetTrx = getReplica(trx);

Expand All @@ -28,7 +28,7 @@ export const getParents = async ({ctx, trx, collectionIds}: GetCollectionsParent
qb1.select()
.from(CollectionModel.tableName)
.where({
[CollectionModelColumn.TenantId]: tenantId,
...(onlyMirrored ? {} : {[CollectionModelColumn.TenantId]: tenantId}),
[CollectionModelColumn.ProjectId]: projectId,
[CollectionModelColumn.DeletedAt]: null,
})
Expand Down

0 comments on commit 8731f5d

Please sign in to comment.