From: Christopher Allan Webber Date: Thu, 10 Oct 2013 16:28:59 +0000 (-0500) Subject: Fix the create_moderation_tables migration to work with postgresql X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=f1318b59c817c1847dd19c3c7d01559039f6e049;p=mediagoblin.git Fix the create_moderation_tables migration to work with postgresql Was comparing/assigning to integers... but that's not how postgres rolls! --- diff --git a/mediagoblin/db/migrations.py b/mediagoblin/db/migrations.py index a1a7c576..21effa66 100644 --- a/mediagoblin/db/migrations.py +++ b/mediagoblin/db/migrations.py @@ -634,14 +634,14 @@ def create_moderation_tables(db): admin_users_ids, active_users_ids, inactive_users_ids = ( db.execute( user_table.select().where( - user_table.c.is_admin==1)).fetchall(), + user_table.c.is_admin==True)).fetchall(), db.execute( user_table.select().where( - user_table.c.is_admin==0).where( + user_table.c.is_admin==False).where( user_table.c.status==u"active")).fetchall(), db.execute( user_table.select().where( - user_table.c.is_admin==0).where( + user_table.c.is_admin==False).where( user_table.c.status!=u"active")).fetchall()) # Get the ids for each of the privileges so we can reference them ~~~~~~~~~