server: handle empty flags in migration

This commit is contained in:
rr- 2018-09-24 11:40:11 +02:00
parent 8a10fc8ffd
commit d3cabc4a36
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ def upgrade():
sa.Column('oldflags', sa.PickleType(), nullable=True), sa.Column('oldflags', sa.PickleType(), nullable=True),
) )
for row in conn.execute(posts.select()): for row in conn.execute(posts.select()):
newflag = ','.join(row.oldflags) newflag = ','.join(row.oldflags) if row.oldflags else ''
conn.execute( conn.execute(
# pylint: disable=no-value-for-parameter # pylint: disable=no-value-for-parameter
posts.update().where( posts.update().where(