Skip to content

Commit 0404d4e

Browse files
committed
another fix for #1894
1 parent c2aa431 commit 0404d4e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

backend/src/services/user.service.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,14 @@ export class UserService implements OnModuleInit {
252252

253253
const apiKey = await this.apikeyRepository.findOneOrFail({
254254
where: { apikey },
255-
relations: ['action', 'mission', 'mission.project'],
255+
// Disable global eager loading to ensure your manual relations take precedence
256+
loadEagerRelations: false,
257+
relations: {
258+
action: true,
259+
mission: {
260+
project: true,
261+
},
262+
},
256263
});
257264

258265
return { user, apiKey };

0 commit comments

Comments
 (0)