double-rating-migration-fix
This commit is contained in:
parent
504d847102
commit
3ebe067dc6
|
@ -322,11 +322,8 @@ async def migrate(entry, storage):
|
||||||
.first()
|
.first()
|
||||||
)
|
)
|
||||||
if reaction:
|
if reaction:
|
||||||
reaction_dict["kind"] = (
|
k = ReactionKind.AGREE if content_rating["value"] > 0 else ReactionKind.DISAGREE
|
||||||
ReactionKind.AGREE
|
reaction_dict["kind"] = k
|
||||||
if content_rating["value"] > 0
|
|
||||||
else ReactionKind.DISAGREE,
|
|
||||||
)
|
|
||||||
reaction.update(reaction_dict)
|
reaction.update(reaction_dict)
|
||||||
else:
|
else:
|
||||||
rea = Reaction.create(**reaction_dict)
|
rea = Reaction.create(**reaction_dict)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user