mirror of
https://github.com/strapi/strapi.git
synced 2025-12-27 07:03:38 +00:00
Fix the fix
It turns out that in some situations it actually is only the id instead of object (nested queries).
This commit is contained in:
parent
3645cc15f4
commit
b7edcffff8
@ -630,7 +630,8 @@ module.exports = {
|
||||
};
|
||||
|
||||
if (association.type === 'model') {
|
||||
params.id = obj[association.alias].id;
|
||||
const rel = obj[association.alias];
|
||||
params.id = typeof rel === 'object' && 'id' in rel ? rel.id : rel;
|
||||
} else {
|
||||
// Get refering model.
|
||||
const ref = association.plugin ?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user