mirror of
https://github.com/zadam/trilium.git
synced 2025-11-06 13:26:01 +01:00
fix initializing new attribute in becca
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user