Commit 7415eae6 authored by stef's avatar stef

[fix] ignore twitter errors

parent 48d76b2d
......@@ -67,7 +67,10 @@ def moderate(request):
return HttpResponseRedirect('/') # Redirect after POST
if request.GET.get('action','')=='approve':
if settings.TWITTER_API:
settings.TWITTER_API.PostUpdate("New infringement reported for %s (%s) %s" % (v.operator, v.country, v.contract))
try:
settings.TWITTER_API.PostUpdate("New infringement reported for %s (%s) %s" % (v.operator, v.country, v.contract))
except:
pass
v.activationid=''
v.save()
messages.add_message(request, messages.INFO, _('Thank you for approving the submission.'))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment