id	summary	reporter	owner	description	type	status	priority	component	severity	resolution	keywords	cc	release
4996	tags plugin fails on upgrading	k0s	osimons	When I enable the TagsPlugin on a fresh environment, and the upgrade never returns.  Specifically, I get a `ProgrammerError` as the cursor is not fresh.  The following patch fixes:\r\n\r\n{{{\r\nIndex: tractags/model.py\r\n===================================================================\r\n--- tractags/model.py_(revision 5614)\r\n+++ tractags/model.py_(working copy)\r\n@@ -20,9 +20,9 @@\r\n         self._upgrade_db(self.env.get_db_cnx())\r\n \r\n     def environment_needs_upgrade(self, db):\r\n-        cursor = db.cursor()\r\n         if self._need_migration(db):\r\n             return True\r\n+        cursor = db.cursor()\r\n         try:\r\n             cursor.execute("select count(*) from tags")\r\n             cursor.fetchone()\r\n}}}	defect	closed	normal	TagsPlugin	normal	fixed			0.11
