core/orm/rating.py
Untone 6d3c0ee39e
All checks were successful
Deploy to core / deploy (push) Successful in 1m36s
isort+authfix
2024-02-19 14:45:55 +03:00

27 lines
544 B
Python

from orm.reaction import ReactionKind
RATING_REACTIONS = [
ReactionKind.LIKE.value,
ReactionKind.ACCEPT.value,
ReactionKind.AGREE.value,
ReactionKind.DISLIKE.value,
ReactionKind.REJECT.value,
ReactionKind.DISAGREE.value,
]
def is_negative(x):
return x in [
ReactionKind.ACCEPT.value,
ReactionKind.LIKE.value,
ReactionKind.PROOF.value,
]
def is_positive(x):
return x in [
ReactionKind.ACCEPT.value,
ReactionKind.LIKE.value,
ReactionKind.PROOF.value,
]