summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2014-08-31 13:10:18 +0700
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2014-08-31 13:10:18 +0700
commita0d5ce77867a76bb82690157d901f06785717d63 (patch)
treeb4d0d0ac70fceea4ce7c36be11d80080e9f15e6b
parent78db8fca24c360894755e08bae70cb29132c007e (diff)
downloadaskbot-a0d5ce77867a76bb82690157d901f06785717d63.tar.gz
askbot-a0d5ce77867a76bb82690157d901f06785717d63.tar.bz2
askbot-a0d5ce77867a76bb82690157d901f06785717d63.zip
removed posts of type reject reason from moderation
-rw-r--r--askbot/models/post.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/askbot/models/post.py b/askbot/models/post.py
index 9ffdf34f..18d3ea13 100644
--- a/askbot/models/post.py
+++ b/askbot/models/post.py
@@ -2204,13 +2204,15 @@ class PostRevisionManager(models.Manager):
kwargs['summary'] = ''
author = kwargs['author']
+ post = kwargs['post']
moderate_email = False
if kwargs.get('email'):
from askbot.models.reply_by_email import emailed_content_needs_moderation
moderate_email = emailed_content_needs_moderation(kwargs['email'])
- needs_moderation = author.needs_moderation() or moderate_email
+ is_content = post.is_question() or post.is_answer() or post.is_comment()
+ needs_moderation = is_content and (author.needs_moderation() or moderate_email)
#0 revision is not shown to the users
if askbot_settings.CONTENT_MODERATION_MODE == 'premoderation' and needs_moderation:
@@ -2223,7 +2225,6 @@ class PostRevisionManager(models.Manager):
})
revision = super(PostRevisionManager, self).create(*args, **kwargs)
else:
- post = kwargs['post']
kwargs['revision'] = post.get_latest_revision_number() + 1
revision = super(PostRevisionManager, self).create(*args, **kwargs)