Private
Public Access
1
0

bug fix tp_open

This commit is contained in:
Sander Roosendaal
2018-07-08 20:11:23 +02:00
parent 81c8dff8a0
commit 5b42e13ba0
3 changed files with 63 additions and 4 deletions

View File

@@ -90,9 +90,15 @@ def imports_open(user,oauth_data):
s = "Token doesn't exist. Need to authorize"
raise NoTokenError("User has no token")
else:
tokenname = oauth_data['tokenname']
refreshtokenname = oauth_data['refreshtokenname']
expirydatename = oauth_data['expirydatename']
if tokenexpirydate and timezone.now()>tokenexpirydate:
token = imports_token_refresh(
user,oauth_data,
user,
tokenname,
refreshtokenname,
expirydatename,
)
return token