Skip to content

Commit

Permalink
Making get_blacklisted_response work for both GET and POST.
Browse files Browse the repository at this point in the history
Previously, this helper only worked if Twilio POSTed to us. In preparation for
supporting both GET and POST requests from Twilio, I'm updating this helper to
analyze HttpResponse.REQUEST as opposed to HttpResponse.POST, this way it'll
work in both cases.
  • Loading branch information
randalldegges-okta-2 committed Mar 19, 2012
1 parent 1945451 commit caf8e75
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion django_twilio/utils.py
Expand Up @@ -18,7 +18,7 @@ def get_blacklisted_response(request):
otherwise. otherwise.
""" """
try: try:
caller = Caller.objects.get(phone_number=request.POST['From']) caller = Caller.objects.get(phone_number=request.REQUEST['From'])
if caller.blacklisted: if caller.blacklisted:
r = Response() r = Response()
r.reject() r.reject()
Expand Down

0 comments on commit caf8e75

Please sign in to comment.