histrio/py-couchdb

all_docs raises excpetion if some documents are not found

bmihelac opened this issue · 7 comments

I would expect that not found items not to be present in list.
Failing testcase is on the way.

refs #36

Exception is as follows:

............E..........................................
======================================================================
ERROR: test_all_404 (__main__.DatabaseQueryTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "tests.py", line 296, in test_all_404
    include_docs='false')
  File "/Users/bmihelac/dev/django/tmp/py-couchdb/pycouchdb/client.py", line 399, in all
    return list(_iterate_no_docs())
  File "/Users/bmihelac/dev/django/tmp/py-couchdb/pycouchdb/client.py", line 394, in _iterate_no_docs
    doc = {"id": row['id'], "rev": row['value']['rev']}
KeyError: 'id'

----------------------------------------------------------------------

Hello, Bojan. This problem is still relevant?

@bmihelac This problem is still relevant?

I believe I fixed this in:

b49240e

All tests pass now. Sorry for late reply.

Tests rebased for master.

Thanks, Bojan.