Fix the create_moderation_tables migration to work with postgresql

Was comparing/assigning to integers... but that's not how postgres rolls!
This commit is contained in:
Christopher Allan Webber 2013-10-10 11:28:59 -05:00
parent 17f0307c70
commit f1318b59c8

View File

@ -634,14 +634,14 @@ def create_moderation_tables(db):
admin_users_ids, active_users_ids, inactive_users_ids = ( admin_users_ids, active_users_ids, inactive_users_ids = (
db.execute( db.execute(
user_table.select().where( user_table.select().where(
user_table.c.is_admin==1)).fetchall(), user_table.c.is_admin==True)).fetchall(),
db.execute( db.execute(
user_table.select().where( 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(), user_table.c.status==u"active")).fetchall(),
db.execute( db.execute(
user_table.select().where( 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()) user_table.c.status!=u"active")).fetchall())
# Get the ids for each of the privileges so we can reference them ~~~~~~~~~ # Get the ids for each of the privileges so we can reference them ~~~~~~~~~