server: handle empty flags in migration
This commit is contained in:
parent
8a10fc8ffd
commit
d3cabc4a36
|
@ -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(
|
||||||
|
|
Loading…
Reference in New Issue