Don't count Quick Start Guide items when checking for empty library
This commit is contained in:
parent
cfc1b56ca6
commit
27f348c7af
1 changed files with 4 additions and 0 deletions
|
@ -649,6 +649,10 @@ Zotero.Library.prototype.hasItems = Zotero.Promise.coroutine(function* () {
|
||||||
throw new Error("Library is not saved yet");
|
throw new Error("Library is not saved yet");
|
||||||
}
|
}
|
||||||
let sql = 'SELECT COUNT(*)>0 FROM items WHERE libraryID=?';
|
let sql = 'SELECT COUNT(*)>0 FROM items WHERE libraryID=?';
|
||||||
|
// Don't count old <=4.0 Quick Start Guide items
|
||||||
|
if (this.libraryID == Zotero.Libraries.userLibraryID) {
|
||||||
|
sql += "AND key NOT IN ('ABCD2345', 'ABCD3456')";
|
||||||
|
}
|
||||||
return !!(yield Zotero.DB.valueQueryAsync(sql, this.libraryID));
|
return !!(yield Zotero.DB.valueQueryAsync(sql, this.libraryID));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue