Example #1
0
def may_toggle_vote(user, image):
    may, reason = may_toggle_vote_image(user, image)
    return may
Example #2
0
def may_not_toggle_vote_reason(user, image):
    may, reason = may_toggle_vote_image(user, image)
    return reason
Example #3
0
 def clean(self):
     may, reason = may_toggle_vote_image(self.reviewer, self.image)
     if not may:
         raise ValidationError(reason)