CouchGrid does not display contents properly when first created

Bug #628416 reported by Rick Spencer on 2010-09-01
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickly Widgets
Medium
Rick Spencer
quickly-widgets (Ubuntu)
Undecided
Unassigned

Bug Description

Steps:
Start with a new record type, one that has no existing records at all

    dicts = [{"ID": 0, "key?": True, "tags": "aaa bbb ccc", "string":"aaaaaaa"},
                 {"ID": 1, "key?": False, "tags": "bbb ccc ddd", "string":"bbbbbbb"},
                 {"ID": 2, "key?": True, "tags": "ccc ddd eee", "string":"cccccccc"},
                 {"ID": 3, "key?": False, "tags": "ddd eee fff", "string":"dddddddd"},
                 {"ID": 4, "key?": True, "tags": "eee fff ggg", "string":"eeeeeeee"}]

    database_name = "couch_widget_test"
    record_type = "couch_grid_filter_test"
    keys = ["ID","tags","key?","string"]
    grid = CouchGrid(database_name, record_type=record_type, dictionaries=dicts, editable=True)
    grid.columns["tags"].set_title("modified title")
    grid.show()

(notice the keys are not used)
Result:
Traceback (most recent call last):
  File "quickly/widgets/grid_filter.py", line 686, in <module>
    grid = CouchGrid(database_name, record_type=record_type, dictionaries=dicts, editable=True)
  File "/home/rick/Projects/flexible_grid_rows/quickly/widgets/couch_grid.py", line 134, in __init__
    self.database = database_name
  File "/home/rick/Projects/flexible_grid_rows/quickly/widgets/couch_grid.py", line 158, in database
    self._refresh_treeview()#first time treeview is reset
  File "/home/rick/Projects/flexible_grid_rows/quickly/widgets/couch_grid.py", line 247, in _refresh_treeview
    raise RuntimeError("Cannot infer columns for CouchGrid")
RuntimeError: Cannot infer columns for CouchGrid

If you include the keys, it works, but new records in the passed in dict do not show up

I'm not sure if this a bug in Lucid, or only in trunk of quidgets right now

Changed in quidgets:
importance: Undecided → Medium
Changed in quidgets:
assignee: nobody → Rick Spencer (rick-rickspencer3)

Fixed (I think) in revision 144.

Changed in quidgets:
status: New → Fix Committed
Didier Roche (didrocks) on 2010-09-13
Changed in quickly-widgets (Ubuntu):
status: New → Fix Released
Changed in quidgets:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers