From 4f23f2515a53718ad29a9bc47fe91cf1bee7f755 Mon Sep 17 00:00:00 2001 From: azivner Date: Sun, 18 Nov 2018 23:36:21 +0100 Subject: [PATCH] fix relation saving --- src/routes/api/attributes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/routes/api/attributes.js b/src/routes/api/attributes.js index ac9aed40a..ac751dab1 100644 --- a/src/routes/api/attributes.js +++ b/src/routes/api/attributes.js @@ -95,7 +95,7 @@ async function updateNoteAttributes(req) { attributeEntity.isInheritable = attribute.isInheritable; attributeEntity.isDeleted = attribute.isDeleted; - if (attributeEntity.type === 'relation' && !attributeEntity.value.trim()) { + if (attributeEntity.type === 'relation' && !attribute.value.trim()) { // relation should never have empty target attributeEntity.isDeleted = true; }