fix-reacted

This commit is contained in:
2022-08-14 06:07:11 +03:00
parent aba5e11522
commit f9c1c20ae4
5 changed files with 18 additions and 4 deletions

View File

@@ -91,7 +91,7 @@ def migrate(entry, storage):
# creating reaction from old rating
rr = Reaction.create(**re_reaction_dict)
day = (re_reaction_dict.get('createdAt') or ts).replace(hour=0, minute=0, second=0, microsecond=0)
ReactedByDay.create(shout=rr.shout, reaction=rr.id, kind=rr.kind, day=day)
ReactedByDay.create(shout=rr.shout, reaction=rr.id, kind=rr.kind, day=day, replyTo=reaction.id)
except Exception as e:
print('[migration] comment rating error: %r' % re_reaction_dict)