Elrond keeps pointing out places I should "is not None" at :)
authorChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 8 Aug 2014 18:24:59 +0000 (13:24 -0500)
committerChristopher Allan Webber <cwebber@dustycloud.org>
Fri, 8 Aug 2014 18:24:59 +0000 (13:24 -0500)
mediagoblin/db/migrations.py

index 9e6321707f56677735caf6a8080e88e681fd7f88..b90140457856a3d0cbed518aaf5e76e229c427ff 100644 (file)
@@ -869,9 +869,9 @@ def revert_username_index(db):
         # table copying.
 
         # Remove whichever of the not-used indexes are in place
-        if users_uploader_index:
+        if users_uploader_index is not None:
             users_uploader_index.drop()
-        if users_username_index:
+        if users_username_index is not None:
             users_username_index.drop()
 
         # Given we're removing indexes then adding a unique constraint