Make libraryID optional for DataObjects, defaulting to user library

This commit is contained in:
Dan Stillman 2015-04-26 02:09:44 -04:00
parent 30535653a6
commit a2b572665d
3 changed files with 3 additions and 9 deletions

View file

@ -3,7 +3,6 @@ describe("Zotero.Items", function() {
it("should return a libraryID and key within a transaction", function* () {
return Zotero.DB.executeTransaction(function* () {
var item = new Zotero.Item('book');
item.libraryID = Zotero.Libraries.userLibraryID;
var itemID = yield item.save();
var {libraryID, key} = Zotero.Items.getLibraryAndKeyFromID(itemID);
@ -19,7 +18,6 @@ describe("Zotero.Items", function() {
try {
yield Zotero.DB.executeTransaction(function* () {
var item = new Zotero.Item('book');
item.libraryID = Zotero.Libraries.userLibraryID;
itemID = yield item.save();
throw 'Aborting transaction -- ignore';
});