server: handle empty flags in migration

This commit is contained in:
rr- 2018-09-24 11:40:11 +02:00
parent 8a10fc8ffd
commit d3cabc4a36

View file

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