Skip to content

Commit

Permalink
Fix check_items() method
Browse files Browse the repository at this point in the history
  • Loading branch information
urschrei committed Feb 14, 2017
1 parent 4a35a5e commit 287434a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyzotero/zotero.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from __future__ import unicode_literals

__author__ = u'Stephan Hügel'
__version__ = '1.2.2'
__version__ = '1.2.3'
__api_version__ = '3'

# Python 3 compatibility faffing
Expand Down Expand Up @@ -890,13 +890,13 @@ def check_items(self, items):
'filename'])
template = template | set(self.temp_keys)
for pos, item in enumerate(items):
to_check = set(i for i in list(item['data'].keys()))
to_check = set(i for i in list(item.keys()))
difference = to_check.difference(template)
if difference:
raise ze.InvalidItemFields(
"Invalid keys present in item %s: %s" % (pos + 1,
' '.join(i for i in difference)))
return [i['data'] for i in items]
return items

def item_types(self):
""" Get all available item types
Expand Down

0 comments on commit 287434a

Please sign in to comment.