Make libraryID optional for DataObjects, defaulting to user library
This commit is contained in:
parent
30535653a6
commit
a2b572665d
3 changed files with 3 additions and 9 deletions
|
@ -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';
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue