From 52a8097bd3bfc8fd53f9862793e33c40012bb9c5 Mon Sep 17 00:00:00 2001 From: Chiemeka Alim Date: Sun, 22 Jul 2018 21:50:23 +0100 Subject: [PATCH] Fix WSGIRequest object does not support item assignment error - Delete request arguments in functions. It is redundant as the first argument is usually the request object - Call the session method on the request object (web_app_session.session). This fixes `self.session[self.csrf_token_session_key] = csrf_token` error --- dropbox/oauth.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dropbox/oauth.py b/dropbox/oauth.py index c51f870d..a5ea5557 100644 --- a/dropbox/oauth.py +++ b/dropbox/oauth.py @@ -266,15 +266,15 @@ def get_dropbox_auth_flow(web_app_session): "dropbox-auth-csrf-token") # URL handler for /dropbox-auth-start - def dropbox_auth_start(web_app_session, request): - authorize_url = get_dropbox_auth_flow(web_app_session).start() + def dropbox_auth_start(web_app_session): + authorize_url = get_dropbox_auth_flow(web_app_session.session).start() redirect_to(authorize_url) # URL handler for /dropbox-auth-finish - def dropbox_auth_finish(web_app_session, request): + def dropbox_auth_finish(web_app_session): try: oauth_result = \\ - get_dropbox_auth_flow(web_app_session).finish( + get_dropbox_auth_flow(web_app_session.session).finish( request.query_params) except BadRequestException, e: http_status(400)