Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
La Quadrature du Net
Respect My Net
Commits
7415eae6
Commit
7415eae6
authored
Jul 14, 2011
by
stef
Browse files
[fix] ignore twitter errors
parent
48d76b2d
Changes
1
Show whitespace changes
Inline
Side-by-side
bt/views.py
View file @
7415eae6
...
...
@@ -67,7 +67,10 @@ def moderate(request):
return
HttpResponseRedirect
(
'/'
)
# Redirect after POST
if
request
.
GET
.
get
(
'action'
,
''
)
==
'approve'
:
if
settings
.
TWITTER_API
:
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.'
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment