From 57297df9e19f14c322fbdf939d26ced950445cc3 Mon Sep 17 00:00:00 2001 From: rr- Date: Tue, 10 May 2016 10:05:47 +0200 Subject: [PATCH] server/tools: fix importing tag category with id=0 --- server/migrate-v1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/migrate-v1 b/server/migrate-v1 index 47cc720c..ab0e3edf 100755 --- a/server/migrate-v1 +++ b/server/migrate-v1 @@ -127,7 +127,7 @@ def import_tag_categories(v1_session, v2_session): for row in exec(v1_session, 'SELECT DISTINCT category FROM tags'): logger.info('Importing tag category %s...', row['category']) category = db.TagCategory() - category.tag_category_id = len(category_to_id_map) + category.tag_category_id = len(category_to_id_map) + 1 category.name = row['category'] category.color = 'default' v2_session.add(category)