Okay, we don't know that indexes are falsey, so let's make it clearer. Yeek!
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 8 Aug 2014 18:18:57 +0000 (13:18 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 8 Aug 2014 18:18:57 +0000 (13:18 -0500)
mediagoblin/db/migrations.py

index 619345c078045335158e9335f4eabe0255a3768e..9e6321707f56677735caf6a8080e88e681fd7f88 100644 (file)
@@ -845,7 +845,7 @@ def revert_username_index(db):
     # was set in models.py
     users_username_index = indexes.get(u'ix_core__users_username')
 
-    if not (users_uploader_index or users_username_index):
+    if users_uploader_index is None and users_username_index is None:
         # We don't need to do anything.
         # The database isn't in a state where it needs fixing
         #