urschrei / pyzotero

Pyzotero: a Python client for the Zotero API
https://pyzotero.readthedocs.org
Other
911 stars 100 forks source link

Updating attachment items #53

Closed christianbrodbeck closed 8 years ago

christianbrodbeck commented 8 years ago

Hi there,

When I tried to update items representing attachments (retrieved with Zotero.children()) I got an error for invalid fields. Just adding the fields like in this PR made it work properly. I am not sure if you would want to just add those field to the known valid fields, or add some more elaborate checks, but this made the updates work properly (I changed the attachment parent attribute).

urschrei commented 8 years ago

Could you give me a bit more detail about how I can reproduce this error?

christianbrodbeck commented 8 years ago

Something like

z = zotero.Zotero(library, 'user', password, True)
item = z.top()[0]
child = z.children(item['key'])[0]
z.update_item(child)
christianbrodbeck commented 8 years ago

Thanks!

urschrei commented 8 years ago

Merged to dev. I'll cut a new release this week, if I get a chance. Thanks!