Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for item.getChildren issue (https://github.com/fcheslack/libZotero/issues/11) #12

Merged
merged 2 commits into from Dec 10, 2013
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/py/libZotero/item.py
Expand Up @@ -5,7 +5,7 @@
from copy import deepcopy
from entry import *
from zotero import responseIsError

import zotero

class Item(Entry):
fieldMap = {
Expand Down Expand Up @@ -469,7 +469,7 @@ def save(self):

def getChildren(self):
#short circuit if has item has no children
if self.numChildren == 0 or self.parentItemKey != false:
if self.numChildren == 0 or self.parentItemKey != False:
return []

config = {'target': 'children', 'libraryType': self.owningLibrary.libraryType, 'libraryID': self.owningLibrary.libraryID, 'itemKey': self.itemKey, 'content': 'json'}
Expand Down
2 changes: 1 addition & 1 deletion lib/py/libZotero/items.py
Expand Up @@ -49,7 +49,7 @@ def addItem(self, item):
def addItemsFromFeed(self, feed):
addedItems = []
for entry in feed.entries:
item = Item(entry)
item = Item(entry,self.owningLibrary)
self.addItem(item)
addedItems.append(item)
return addedItems
Expand Down