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

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