Ticket #12325: django-comments-moderation-allow-zero-moderate_after.patch

File django-comments-moderation-allow-zero-moderate_after.patch, 608 bytes (added by zhigang, 15 years ago)
  • django/django/contrib/comments/moderation.py

    old new class CommentModerator(object):  
    220220        non-public), ``False`` otherwise.
    221221
    222222        """
    223         if self.auto_moderate_field and self.moderate_after:
     223        if self.auto_moderate_field and self.moderate_after is not None:
    224224            if self._get_delta(datetime.datetime.now(), getattr(content_object, self.auto_moderate_field)).days >= self.moderate_after:
    225225                return True
    226226        return False
Back to Top