Skip to content

Build your personal knowledge base with Trilium Notes

fix adding relation noteId as value, closes #1329

zadam9f424836e29c
diff --git a/src/public/app/widgets/attribute_detail.js b/src/public/app/widgets/attribute_detail.js
index 4274a8014d..95c9865f56 100644
--- a/src/public/app/widgets/attribute_detail.js
+++ b/src/public/app/widgets/attribute_detail.js
@@ -283,7 +283,9 @@ export default class AttributeDetailWidget extends TabAwareWidget {
return false;
}
- this.attribute.value = suggestion.notePath;
+ const pathChunks = suggestion.notePath.split('/');
+
+ this.attribute.value = pathChunks[pathChunks.length - 1]; // noteId
this.triggerCommand('updateAttributeList', { attributes: this.allAttributes });
this.updateRelatedNotes();