Skip to content

Build your personal knowledge base with Trilium Notes

fix relation saving

azivner4f23f2515a53
diff --git a/src/routes/api/attributes.js b/src/routes/api/attributes.js
index ac9aed40a7..ac751dab17 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;
}