rating in orm
Some checks failed
Deploy to core / deploy (push) Failing after 3m55s

This commit is contained in:
2024-02-19 09:50:15 +03:00
parent ca22ac9b13
commit f74358be76
2 changed files with 1 additions and 1 deletions

27
orm/rating.py Normal file
View File

@@ -0,0 +1,27 @@
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,
]