fix "reviving" deleted attributes, closes #1404

This commit is contained in:
zadam 2020-11-11 22:44:13 +01:00
parent 402e5c4d81
commit a3a2bc0a74
2 changed files with 3 additions and 2 deletions

2
package-lock.json generated
View file

@ -1,6 +1,6 @@
{
"name": "trilium",
"version": "0.45.2",
"version": "0.45.3",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View file

@ -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