From 52358e93ada91b664811566344fb2e5c3d65c9fd Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Wed, 24 Jun 2020 17:26:14 +0100 Subject: [PATCH] test fix --- packages/server/src/api/controllers/record.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/server/src/api/controllers/record.js b/packages/server/src/api/controllers/record.js index 3d77d95f3b..4efe1acb73 100644 --- a/packages/server/src/api/controllers/record.js +++ b/packages/server/src/api/controllers/record.js @@ -45,7 +45,7 @@ exports.save = async function(ctx) { // create links in other tables for (let key in record) { - if (model.schema[key].type === "link") { + if (model.schema[key] && model.schema[key].type === "link") { const linked = await db.allDocs({ include_docs: true, keys: record[key],