diff options
Diffstat (limited to 'forum/models/meta.py')
-rwxr-xr-x | forum/models/meta.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/forum/models/meta.py b/forum/models/meta.py index 7c3f5d36..6923a932 100755 --- a/forum/models/meta.py +++ b/forum/models/meta.py @@ -48,6 +48,10 @@ class Vote(MetaContent): def is_downvote(self): return self.vote == self.VOTE_DOWN + def is_opposite(self, vote_type): + assert(vote_type in (self.VOTE_UP, self.VOTE_DOWN)) + return self.vote != vote_type + class FlaggedItemManager(models.Manager): def get_flagged_items_count_today(self, user): @@ -86,4 +90,4 @@ class Comment(MetaContent): logging.debug('problem pinging google did you register you sitemap with google?') def __unicode__(self): - return self.comment
\ No newline at end of file + return self.comment |