small fixes

This commit is contained in:
zadam
2020-04-05 15:35:01 +02:00
parent 7bd05415fa
commit 8d312515dd
3 changed files with 8 additions and 3 deletions

View File

@@ -419,12 +419,14 @@ async function saveLinks(note, content) {
&& existingLink.name === foundLink.name);
if (!existingLink) {
await new Attribute({
const newLink = await new Attribute({
noteId: note.noteId,
type: foundLink.name === 'externalLink' ? 'label' : 'relation',
name: foundLink.name,
value: foundLink.value,
}).save();
existingLinks.push(newLink);
}
else if (existingLink.isDeleted) {
existingLink.isDeleted = false;