Skip to content

Commit 9d549dc

Browse files
authored
chore: merge master into beta
2 parents 17eab99 + 8bf95a8 commit 9d549dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/adapters/sequelize.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ module.exports = (model, opts) => {
8787
const pkIsFk = primaryKeyIsForeignKey(association);
8888
if (pkIsFk) {
8989
const fk = fields.find((field) => field.reference === `${association.associationAccessor}.${association.foreignKey}`);
90-
fk.foreignAndPrimaryKey = true;
90+
if (fk) {
91+
fk.foreignAndPrimaryKey = true;
92+
}
9193
}
9294
});
9395

0 commit comments

Comments
 (0)