Modify ↓
Opened 20 years ago
Closed 20 years ago
#2830 closed defect (fixed)
sort by component oopses
| Reported by: | Owned by: | Jonas Borgström | |
|---|---|---|---|
| Priority: | normal | Milestone: | 0.10 |
| Component: | general | Version: | devel |
| Severity: | normal | Keywords: | |
| Cc: | Branch: | ||
| Release Notes: | |||
| API Changes: | |||
| Internal Changes: | |||
Description
Hi,
When sorting by component, I managed to trigger the following traceback:
Python traceback
Traceback (most recent call last):
File "/usr/local/lib/python2.3/site-packages/trac/web/modpython_frontend.py", line 206, in handler
dispatch_request(mpr.path_info, mpr, env)
File "/usr/local/lib/python2.3/site-packages/trac/web/main.py", line 142, in dispatch_request
dispatcher.dispatch(req)
File "/usr/local/lib/python2.3/site-packages/trac/web/main.py", line 110, in dispatch
resp = chosen_handler.process_request(req)
File "/usr/local/lib/python2.3/site-packages/trac/ticket/report.py", line 116, in process_request
resp = self._render_view(req, db, id)
File "/usr/local/lib/python2.3/site-packages/trac/ticket/report.py", line 317, in _render_view
rows.sort(sorter.sort)
AttributeError: 'tuple' object has no attribute 'sort'
The fix is pretty trivial; it is expected that execute_report() is returning lists, not tuples.
Attachments (1)
Change History (4)
by , 20 years ago
| Attachment: | trac-sortfix-r2946.patch added |
|---|
comment:1 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
The problem was apparently due to MySQLdb returning tuples from cursor.fetchall() instead of lists. I cleaned up the code a bit in [2947] to use sorted() instead of the comparator which fixes this as well.
comment:2 by , 20 years ago
| Resolution: | fixed |
|---|---|
| Status: | closed → reopened |
comment:3 by , 20 years ago
| Resolution: | → fixed |
|---|---|
| Status: | reopened → closed |
Please don't reopen without a comment.
Note:
See TracTickets
for help on using tickets.



Fix column sort oops, against r2946.