Ticket #5593 (closed defect: fixed)
db upgrades broken
| Reported by: | Dave Abrahams <dave@…> | Owned by: | cboos |
|---|---|---|---|
| Priority: | highest | Milestone: | 0.11 |
| Component: | admin/console | Version: | devel |
| Severity: | blocker | Keywords: | |
| Cc: |
Description
I was upgrading from to r5468 to r5748 and got this:
Command failed: iteration over non-sequence
with no backtrace! Had to somehow divine that trac-admin is run through trac/admin/console.py (the body of trac-admin gives no clue) and comment out the exception handler to debug this. The following patch fixes it:
-
trac/upgrades/db21.py
3 3 """Upgrade the reports to better handle the new workflow capabilities""" 4 4 db = env.get_db_cnx() 5 5 owner = db.concat('owner', "' *'") 6 reports = list(cursor.execute('SELECT id, query, description FROM report')) 6 reports = list(cursor.execute('SELECT id, query, description FROM report') 7 or ()) 7 8 for report, query, description in reports: 8 9 # All states other than 'closed' are "active". 9 10 query = query.replace("IN ('new', 'assigned', 'reopened')",
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


