Prevent possible error if schema check occurs before schema update
Not sure if this can happen, but if there's any way for the schema integrity check to run before the global schema is updated, use -1 for the annotation itemTypeID.
This commit is contained in:
parent
2d2062a63d
commit
db0bd56688
1 changed files with 2 additions and 2 deletions
|
@ -1799,9 +1799,9 @@ Zotero.Schema = new function(){
|
|||
var noteID = parseInt(yield Zotero.DB.valueQueryAsync(
|
||||
"SELECT itemTypeID FROM itemTypes WHERE typeName='note'"
|
||||
));
|
||||
var annotationID = parseInt(yield Zotero.DB.valueQueryAsync(
|
||||
var annotationID = parseInt((yield Zotero.DB.valueQueryAsync(
|
||||
"SELECT itemTypeID FROM itemTypes WHERE typeName='annotation'"
|
||||
));
|
||||
)) || -1);
|
||||
|
||||
// The first position is for testing and the second is for repairing. Can be either SQL
|
||||
// statements or promise-returning functions. For statements, the repair entry can be either
|
||||
|
|
Loading…
Reference in a new issue