Fix error with nested saved searches containing post-search filters

Addresses #1518
This commit is contained in:
Dan Stillman 2018-06-26 00:47:12 +02:00
parent cbf63f4e72
commit 3c1cdd57d2

View file

@ -1244,7 +1244,11 @@ Zotero.Search.prototype._buildQuery = Zotero.Promise.coroutine(function* () {
// -- should probably use a temporary table instead
if (hasFilter){
let subids = yield obj.search();
condSQL += subids.join();
condSQL += "itemID ";
if (condition.operator == 'isNot') {
condSQL += "NOT ";
}
condSQL += "IN (" + subids.join();
}
// Otherwise just put the SQL in a subquery
else {