migration-fixes
This commit is contained in:
parent
f92be99bce
commit
8041c02878
|
@ -83,6 +83,7 @@ def topics(export_topics, topics_by_slug, topics_by_oid, cats_data, tags_data):
|
|||
if len(sys.argv) > 2: limit = int(sys.argv[2])
|
||||
print('migrating %d topics...' % limit)
|
||||
counter = 0
|
||||
topics_by_title = {}
|
||||
for tag in tags_data:
|
||||
old_id = tag["createdBy"]
|
||||
tag["createdBy"] = user_id_map.get(old_id, 0)
|
||||
|
|
0
migration/content/.gitkeep
Normal file
0
migration/content/.gitkeep
Normal file
0
migration/content/article/.gitkeep
Normal file
0
migration/content/article/.gitkeep
Normal file
0
migration/content/image/.gitkeep
Normal file
0
migration/content/image/.gitkeep
Normal file
0
migration/content/music/.gitkeep
Normal file
0
migration/content/music/.gitkeep
Normal file
0
migration/content/prose/.gitkeep
Normal file
0
migration/content/prose/.gitkeep
Normal file
0
migration/content/video/.gitkeep
Normal file
0
migration/content/video/.gitkeep
Normal file
|
@ -34,7 +34,7 @@ def migrate(entry):
|
|||
res['old_id'] = entry['_id']
|
||||
res['password'] = entry['services']['password'].get('bcrypt', '')
|
||||
del entry['services']
|
||||
del entry['subscribedTo']
|
||||
if entry.get('subscribedTo', '') != '': del entry['subscribedTo']
|
||||
res['username'] = entry['emails'][0]['address']
|
||||
res['email'] = res['username']
|
||||
res['wasOnlineAt'] = parse(entry.get('loggedInAt', entry['createdAt']))
|
||||
|
|
Loading…
Reference in New Issue
Block a user