server/tools: fix importing tag category with id=0
This commit is contained in:
parent
b37979546f
commit
57297df9e1
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue