Skip to content

Wrong handling of _security #134

Description

@rakoo

When the _security doc of a database is saved through Database#save_doc, a KeyError is raised. Here is the bottom of the stacktrace (the rest is irrelevant to couchdbkit, only specific to my application) :

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

This is because PUTing the _security doc in a database only returns {"ok": True} which is not parsable by this line of code.

Is there a workaround for this ?

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