commit f0aae549c5b3615c3651d59ecbc9cadccf44630f
parent efdc6f12301c352cceb34ccc452933ce35c921c5
Author: Aurimas Vinckevicius <aurimas.dev@gmail.com>
Date: Fri, 14 Nov 2014 04:48:47 -0600
Allow bypassing library edit check when saving data objects
Pass {skipEditCheck: true} option to .save()
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/chrome/content/zotero/xpcom/data/dataObject.js b/chrome/content/zotero/xpcom/data/dataObject.js
@@ -563,7 +563,7 @@ Zotero.DataObject.prototype._recoverFromSaveError = Zotero.Promise.coroutine(fun
Zotero.DataObject.prototype._initSave = Zotero.Promise.coroutine(function* (env) {
env.isNew = !this.id;
- this.editCheck();
+ if (!env.options.skipEditCheck) this.editCheck();
if (!this.hasChanged()) {
Zotero.debug(this._ObjectType + ' ' + this.id + ' has not changed', 4);