Removing use of request.REQUEST. Deprecated since Django 1.7
1 files changed, 3 insertions(+), 2 deletions(-)

M trello_broker/views.py
M trello_broker/views.py +3 -2
@@ 39,8 39,9 @@ class BitBucketPostView(View):
         except (ValueError, KeyError) as e:
             return HttpResponseBadRequest()
 
-        query = Q(slug=repo_slug) & \
-                Q(access_key=request.REQUEST.get('access_key', ''))
+        access_key = \
+            request.POST.get('access_key', request.GET.get('access_key', ''))
+        query = Q(slug=repo_slug) & Q(access_key=access_key)
         repo = get_object_or_404(BitBucketRepo, query)
         trello_distribute(repo, json_data)
         return HttpResponse('OK')