mirror of
https://github.com/zadam/trilium.git
synced 2025-01-04 06:13:36 +08:00
fix initializing new attribute in becca
This commit is contained in:
parent
d975acc99a
commit
37c30bf88a
1 changed files with 4 additions and 3 deletions
|
@ -80,9 +80,10 @@ function setNoteAttribute(req) {
|
|||
attr.value = body.value;
|
||||
attr.save();
|
||||
} else {
|
||||
const attr = new Attribute(body);
|
||||
attr.noteId = noteId;
|
||||
attr.save();
|
||||
const params = {...body};
|
||||
params.noteId = noteId; // noteId must be set before calling constructor for proper initialization
|
||||
|
||||
new Attribute(params).save();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue