From 3ebe067dc61dcc57de2483b3188c5c0a02d44178 Mon Sep 17 00:00:00 2001 From: tonyrewin Date: Wed, 19 Oct 2022 09:44:59 +0300 Subject: [PATCH] double-rating-migration-fix --- migration/tables/content_items.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/migration/tables/content_items.py b/migration/tables/content_items.py index cb90f106..b70b6aa4 100644 --- a/migration/tables/content_items.py +++ b/migration/tables/content_items.py @@ -322,11 +322,8 @@ async def migrate(entry, storage): .first() ) if reaction: - reaction_dict["kind"] = ( - ReactionKind.AGREE - if content_rating["value"] > 0 - else ReactionKind.DISAGREE, - ) + k = ReactionKind.AGREE if content_rating["value"] > 0 else ReactionKind.DISAGREE + reaction_dict["kind"] = k reaction.update(reaction_dict) else: rea = Reaction.create(**reaction_dict)