From 894ace79f8eb4793fd79d06ffebb7e0430bfcd83 Mon Sep 17 00:00:00 2001 From: Thierry Date: Wed, 1 Nov 2023 10:06:50 +0100 Subject: [PATCH] fix(core): Fix collection findBySlug issue (#2480) Fixes #2395 Co-authored-by: Gautier Darchen --- packages/core/src/service/services/collection.service.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/packages/core/src/service/services/collection.service.ts b/packages/core/src/service/services/collection.service.ts index d148ce287c..3c9c153423 100644 --- a/packages/core/src/service/services/collection.service.ts +++ b/packages/core/src/service/services/collection.service.ts @@ -223,7 +223,14 @@ export class CollectionService implements OnModuleInit { ): Promise | undefined> { const translations = await this.connection.getRepository(ctx, CollectionTranslation).find({ relations: ['base'], - where: { slug }, + where: { + slug, + base: { + channels: { + id: ctx.channelId, + }, + }, + }, }); if (!translations?.length) {