1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-11-29 22:48:10 +02:00

Bug fixes and integration tests for cli

This commit is contained in:
Laurent Cozic
2017-07-11 18:41:18 +00:00
parent 8c5f0622a2
commit d1fecfde57
6 changed files with 194 additions and 4 deletions

View File

@@ -55,6 +55,7 @@ class Note extends BaseItem {
}
static loadFolderNoteByField(folderId, field, value) {
if (!folderId) throw new Error('folderId is undefined');
return this.modelSelectOne('SELECT * FROM notes WHERE is_conflict = 0 AND `parent_id` = ? AND `' + field + '` = ?', [folderId, value]);
}
@@ -124,7 +125,7 @@ class Note extends BaseItem {
this.logger().info('Updating lat/long of note ' + noteId);
let note = Note.load(noteId);
let note = await Note.load(noteId);
if (!note) return; // Race condition - note has been deleted in the meantime
note.longitude = geoData.coords.longitude;