From d3cabc4a36d1a20007b3dcf580157bec2c204808 Mon Sep 17 00:00:00 2001 From: rr- Date: Mon, 24 Sep 2018 11:40:11 +0200 Subject: [PATCH] server: handle empty flags in migration --- .../versions/1cd4c7b22846_change_flags_column_to_string.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/szurubooru/migrations/versions/1cd4c7b22846_change_flags_column_to_string.py b/server/szurubooru/migrations/versions/1cd4c7b22846_change_flags_column_to_string.py index 04e0764..b450b1d 100644 --- a/server/szurubooru/migrations/versions/1cd4c7b22846_change_flags_column_to_string.py +++ b/server/szurubooru/migrations/versions/1cd4c7b22846_change_flags_column_to_string.py @@ -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(