Skip to content

Keyerror when saving security docs #177

Description

@muellermichel

This issue is related to #134.

There still seems to be a problem when saving security documents. I get

File "/usr/local/lib/python2.7/dist-packages/couchdbkit/client.py", line 513, in save_doc;     doc1.update({'_id': res['id'], '_rev': res['rev']});KeyError: 'id';

The code lines in question are 510ff in client.py:

if 'batch' in params and 'id' in res:
        doc1.update({ '_id': res['id']})
    else:
        doc1.update({'_id': res['id'], '_rev': res['rev']})

Obviously, the 'id' in res check is useless since in the else case it's still being accessed directly from the response dict.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions