Better recover from delete error when non-attachment is in FT tables

This commit is contained in:
Dan Stillman 2012-02-24 12:03:18 -05:00
parent 78bfbf3e4f
commit d359b68062

View file

@ -4192,7 +4192,7 @@ Zotero.Item.prototype.erase = function() {
catch (e) {
// If deletion fails, try to correct a few things that have come up before
Zotero.debug("Item deletion failed -- trying to fix", 2);
Zotero.DB.query('DELETE FROM fulltextItemWords WHERE itemID=?', this.id);
Zotero.Fulltext.clearItemWords(this.id);
Zotero.DB.query('DELETE FROM itemTags WHERE itemID=?', this.id);
// And then try again