[minor][fix] check for oauth1 access_key and access_secret before generating dropbox's oauth2 token (#3593)
This commit is contained in:
parent
b7e1060ea7
commit
88c8df2350
1 changed files with 3 additions and 0 deletions
|
|
@ -272,6 +272,9 @@ def set_dropbox_access_token(access_token):
|
|||
frappe.db.commit()
|
||||
|
||||
def generate_oauth2_access_token_from_oauth1_token(dropbox_settings=None):
|
||||
if not dropbox_settings.get("access_key") or not dropbox_settings.get("access_secret"):
|
||||
return {}
|
||||
|
||||
url = "https://api.dropboxapi.com/2/auth/token/from_oauth1"
|
||||
headers = {"Content-Type": "application/json"}
|
||||
auth = (dropbox_settings["app_key"], dropbox_settings["app_secret"])
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue