mirror of
https://github.com/zadam/trilium.git
synced 2025-03-01 14:22:32 +01:00
Merge branch 'feature/typescript_backend_6' into feature/typescript_backend_10
This commit is contained in:
commit
39e152b0b9
@ -137,10 +137,7 @@ export default class Becca {
|
|||||||
return branch;
|
return branch;
|
||||||
}
|
}
|
||||||
|
|
||||||
getAttribute(attributeId: string | null): BAttribute | null {
|
getAttribute(attributeId: string): BAttribute | null {
|
||||||
if (!attributeId) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return this.attributes[attributeId];
|
return this.attributes[attributeId];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ function createRelation(req: Request) {
|
|||||||
const targetNoteId = req.params.targetNoteId;
|
const targetNoteId = req.params.targetNoteId;
|
||||||
const name = req.params.name;
|
const name = req.params.name;
|
||||||
|
|
||||||
const attributeId = sql.getValue<string | null>(`SELECT attributeId FROM attributes WHERE isDeleted = 0 AND noteId = ? AND type = 'relation' AND name = ? AND value = ?`, [sourceNoteId, name, targetNoteId]);
|
const attributeId = sql.getValue<string>(`SELECT attributeId FROM attributes WHERE isDeleted = 0 AND noteId = ? AND type = 'relation' AND name = ? AND value = ?`, [sourceNoteId, name, targetNoteId]);
|
||||||
let attribute = becca.getAttribute(attributeId);
|
let attribute = becca.getAttribute(attributeId);
|
||||||
|
|
||||||
if (!attribute) {
|
if (!attribute) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user