Skip to content

Commit

Permalink
fix(core): Fix collection findBySlug issue (vendure-ecommerce#2480)
Browse files Browse the repository at this point in the history
Fixes vendure-ecommerce#2395 

Co-authored-by: Gautier Darchen <[email protected]>
  • Loading branch information
ttournie and gdarchen authored Nov 1, 2023
1 parent a8481bf commit 894ace7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/core/src/service/services/collection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,14 @@ export class CollectionService implements OnModuleInit {
): Promise<Translated<Collection> | undefined> {
const translations = await this.connection.getRepository(ctx, CollectionTranslation).find({
relations: ['base'],
where: { slug },
where: {
slug,
base: {
channels: {
id: ctx.channelId,
},
},
},
});

if (!translations?.length) {
Expand Down

0 comments on commit 894ace7

Please sign in to comment.