Opened 16 years ago
Closed 16 years ago
#5593 closed defect (fixed)
db upgrades broken
|Reported by:||Owned by:||Christian Boos|
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:
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')",
Change History (2)
comment:1 by , 16 years ago
|Status:||new → assigned|
comment:2 by , 16 years ago
|Status:||assigned → closed|
Fixed in r5756.
Note: See TracTickets for help on using tickets.
#5575 was closed as duplicate. I've closed it in favor of this one, as there was a patch here.
But upon further examination, the patch is not correct, as the return value of
cursor.executeis not specified (see PEP:0249), and used to be
So I'll use