Skip to content

Build your personal knowledge base with Trilium Notes

fix "reviving" deleted attributes, closes #1404

zadama3a2bc0a74e8
diff --git a/package-lock.json b/package-lock.json
index ef978b2111..ff20c3e3dd 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1,6 +1,6 @@
{
"name": "trilium",
- "version": "0.45.2",
+ "version": "0.45.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
diff --git a/src/routes/api/attributes.js b/src/routes/api/attributes.js
index 64ebc53de9..8de30e9c47 100644
--- a/src/routes/api/attributes.js
+++ b/src/routes/api/attributes.js
@@ -52,8 +52,9 @@ function updateNoteAttribute(req) {
attribute.type = body.type;
}
- if (body.value.trim()) {
+ if (body.type !== 'relation' || body.value.trim()) {
attribute.value = body.value;
+ attribute.isDeleted = false;
}
else {
// relations should never have empty target