Bug when testing if environment needs upgrade
|Reported by:||anderson@…||Owned by:||athomas|
I detected an bug when the plug-in tests if the environment needs upgrade. It counts how much items there are on the table votes. But, at least on MySQL, if there is no records, it don´t returns nothing. So commented the line above and everything worked great. If don´t do it, the trac always says that the database needs an upgrade.
Just one line commented on init.py:
def environment_needs_upgrade(self, db):
cursor = db.cursor()
cursor.execute("SELECT COUNT(*) FROM votes")