Don't stop everything if Akismet isn't available.

This commit is contained in:
Ray Schamp 2015-01-02 18:31:00 -05:00
parent 0d28e303b6
commit f8c5c9bebb

View file

@ -719,7 +719,8 @@ class PostStatus(models.Model):
fails. report_type is 'spam' or 'ham'. Used by report_spam/report_ham.
"""
if akismet_api is None:
raise AkismetError("Can't submit to Akismet. No API.")
logger.error("Can't submit to Akismet. No API.")
return None
data = self.to_akismet_data()
content = self.to_akismet_content()