Of course, that would break the tests, so dev only.
This commit is contained in:
parent
a67fe5a44b
commit
ff10922611
1 changed files with 1 additions and 1 deletions
|
@ -69,7 +69,7 @@ logger = logging.getLogger(__name__)
|
|||
akismet_api = None
|
||||
try:
|
||||
from akismet import Akismet
|
||||
if getattr(settings, 'ENVIRONMENT', 'production') not in ['test', 'development']:
|
||||
if getattr(settings, 'ENVIRONMENT', 'production') != 'development':
|
||||
akismet_api = Akismet(key=forum_settings.AKISMET_API_KEY, blog_url=forum_settings.AKISMET_BLOG_URL, agent=forum_settings.AKISMET_AGENT)
|
||||
if not akismet_api.verify_key():
|
||||
logger.error("Invalid Aksimet API key.", extra={'key': akismet_api.key, 'blog': akismet_api.blog_url, 'user_agent': akismet_api.user_agent})
|
||||
|
|
Reference in a new issue