mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
redesign of createNote APIs, WIP
This commit is contained in:
@@ -79,6 +79,10 @@ class Attribute extends Entity {
|
||||
|
||||
async beforeSaving() {
|
||||
if (!this.value) {
|
||||
if (this.type === 'relation') {
|
||||
throw new Error(`Cannot save relation ${this.name} since it does not target any note.`);
|
||||
}
|
||||
|
||||
// null value isn't allowed
|
||||
this.value = "";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user