remove topic id; topic children as json column

This commit is contained in:
knst-kotov
2021-12-12 12:44:54 +03:00
parent e8780cfb86
commit d00488a458
7 changed files with 11 additions and 35 deletions

View File

@@ -224,7 +224,7 @@ def migrate(entry, users_by_oid, topics_by_oid):
shout_dict['id'] = s.id
shout_dict['topics'] = []
for topic in r['topics']:
ShoutTopic.create(**{ 'shout': s.id, 'topic': topic['id'] })
ShoutTopic.create(**{ 'shout': s.id, 'topic': topic['slug'] })
shout_dict['topics'].append(topic['slug'])
except Exception as e:
raise e