mirror of
https://github.com/strapi/strapi.git
synced 2026-01-06 12:13:52 +00:00
Fix relation bug
This commit is contained in:
parent
af66edddf1
commit
b08c5bf3d2
@ -23,7 +23,7 @@ const buildQuery = ({ model, filters }) => qb => {
|
||||
|
||||
let fieldKey = `${associationModel.collectionName}.${attributeKey}`;
|
||||
|
||||
if (association && attributeKey === whereClause.field) {
|
||||
if (association && attributeKey === field) {
|
||||
fieldKey = `${associationModel.collectionName}.${associationModel.primaryKey}`;
|
||||
}
|
||||
|
||||
|
||||
@ -217,7 +217,7 @@ describe('Test Graphql Relations API End to End', () => {
|
||||
createDocument: {
|
||||
document: {
|
||||
...selectFields(document),
|
||||
labels: data.labels.map(selectFields),
|
||||
labels: expect.arrayContaining(data.labels.map(selectFields)),
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user