"_id" key not accessible from Record object

Bug #501168 reported by Ryan Paul
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
desktopcouch
Confirmed
Low
Ubuntu One Client Engineering team

Bug Description

The __getitem__ method of desktopcouch.records.Record raises a KeyError when I attempt to access an internal key. This prevents me from accessing the record ID by invoking __getitem__ with the "_id" key. Records that I have retrieved with get_record exhibit this problem, but not records that I have retrieved with get_records. I'd like to be able to consistently access the ID of a record using the "_id" key.

Stuart Langridge (sil)
Changed in desktopcouch:
assignee: nobody → John Lenton (chipaca)
Stuart Langridge (sil)
Changed in desktopcouch:
importance: Undecided → Low
Changed in desktopcouch:
assignee: John Lenton (chipaca) → Ubuntu One Desktop+ team (ubuntuone-desktop+)
tags: added: couchdb desktop+
tags: added: desktopcouch
removed: couchdb
Changed in desktopcouch:
status: New → Confirmed
Revision history for this message
Chad Miller (cmiller) wrote :

Yeah, db.get_record() gets one of our Record, but get_records() is a lazy iter of Row objects.

I suppose I could make a iter-consumer, and provider that wraps the Row with the same interface as Record, namely .record_id and .record_type. How does that sound?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.