fix relation saving

This commit is contained in:
azivner 2018-11-18 23:36:21 +01:00
parent 8e16cc2326
commit 4f23f2515a

View File

@ -95,7 +95,7 @@ async function updateNoteAttributes(req) {
attributeEntity.isInheritable = attribute.isInheritable; attributeEntity.isInheritable = attribute.isInheritable;
attributeEntity.isDeleted = attribute.isDeleted; attributeEntity.isDeleted = attribute.isDeleted;
if (attributeEntity.type === 'relation' && !attributeEntity.value.trim()) { if (attributeEntity.type === 'relation' && !attribute.value.trim()) {
// relation should never have empty target // relation should never have empty target
attributeEntity.isDeleted = true; attributeEntity.isDeleted = true;
} }