diff --git a/tildes/tildes/models/comment/comment.py b/tildes/tildes/models/comment/comment.py index 0685408..a4f52f2 100644 --- a/tildes/tildes/models/comment/comment.py +++ b/tildes/tildes/models/comment/comment.py @@ -259,8 +259,14 @@ class Comment(DatabaseModel): """Return whether a label has been applied enough to be considered "active".""" label_weight = self.label_weights[label_name] - # all labels must have at least 1.0 weight - if label_weight < 1.0: + # Exemplary labels become "active" at 0.5 weight, all others at 1.0 + # Would be best to use the default_user_comment_label_weight value if possible + if label_name == "exemplary": + min_weight = 0.5 + else: + min_weight = 1.0 + + if label_weight < min_weight: return False # for "noise", weight must be more than 1/5 of the vote count (5 votes diff --git a/tildes/tildes/models/comment/comment_tree.py b/tildes/tildes/models/comment/comment_tree.py index 89fb711..7e8d98a 100644 --- a/tildes/tildes/models/comment/comment_tree.py +++ b/tildes/tildes/models/comment/comment_tree.py @@ -292,7 +292,7 @@ class CommentInTree(ObjectProxy): return (self.num_votes // 2,) # Exemplary comments add 1.0 to the the total weight of the exemplary labels, - # and multiply the vote count by that. Minimum (weight 1.0), votes are doubled. + # and multiply the vote count by that. For example, weight 1.0 = votes doubled. if self.is_label_active("exemplary"): multiplier = self.label_weights["exemplary"] + 1.0 return (round(multiplier * self.num_votes),)