fix migration

This commit is contained in:
knst-kotov
2021-11-23 17:17:19 +03:00
parent 5070ec2ac7
commit a07ada7de0
2 changed files with 17 additions and 18 deletions

View File

@@ -36,7 +36,6 @@ def migrate(entry):
shout: Int!
deletedAt: DateTime
deletedBy: Int
rating: Int
ratings: [CommentRating]
views: Int
old_id: String
@@ -54,8 +53,9 @@ def migrate(entry):
'body': html2text(entry['body']),
'shout': shout.id
}
if 'rating' in entry:
comment_dict['rating'] = entry['rating']
#TODO save as CommentRating
#if 'rating' in entry:
# comment_dict['rating'] = entry['rating']
if entry.get('deleted'):
comment_dict['deletedAt'] = date_parse(entry['updatedAt'])
comment_dict['deletedBy'] = str(entry['updatedBy'])