def sum_equally_voted_reputation(self, contribution, value):
"""return the sum of reputation of evaluators of evaluation.contribution that
have evaluated the same value"""
equally_voted_rep = DBSession.query(func.sum(User.reputation)).\
join(Evaluation).\
filter(Evaluation.contribution_id == contribution.id).\
filter(Evaluation.value == value).\
one()[0] or 0
return equally_voted_rep
评论列表
文章目录