mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
fix initializing new attribute in becca
This commit is contained in:
parent
d975acc99a
commit
37c30bf88a
@ -80,9 +80,10 @@ function setNoteAttribute(req) {
|
|||||||
attr.value = body.value;
|
attr.value = body.value;
|
||||||
attr.save();
|
attr.save();
|
||||||
} else {
|
} else {
|
||||||
const attr = new Attribute(body);
|
const params = {...body};
|
||||||
attr.noteId = noteId;
|
params.noteId = noteId; // noteId must be set before calling constructor for proper initialization
|
||||||
attr.save();
|
|
||||||
|
new Attribute(params).save();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user