Skip to content
/ core Public

Commit bf20aa5

Browse files
committed
fix(activity): add strictPopulate false for polymorphic ref category populate
1 parent 408f292 commit bf20aa5

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/core/src/modules/activity/activity.service.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,12 @@ export class ActivityService implements OnModuleInit, OnModuleDestroy {
545545
.populate({
546546
path: 'ref',
547547
select: 'title nid slug subtitle content categoryId category',
548-
populate: { path: 'category', select: 'slug name' },
548+
populate: {
549+
path: 'category',
550+
select: 'slug name',
551+
strictPopulate: false,
552+
},
553+
strictPopulate: false,
549554
})
550555
.lean({ getters: true })
551556
.sort({

0 commit comments

Comments
 (0)