Fix a bug that will lead to error when external_login() is called

This commit is contained in:
Peidong Liu 2016-04-13 14:30:44 +08:00
parent ce0d18a8df
commit c4dae009a3
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,9 @@ class dockletRequest():
@classmethod
def unauthorizedpost(self, url = '/', data = None):
logger.info("Docklet Unauthorized Request: data = %s, url = %s" % (data, url))
data = dict(data)
data_log = {'user': data.get('user', 'external')}
logger.info("Docklet Unauthorized Request: data = %s, url = %s" % (data_log, url))
result = requests.post(endpoint + url, data = data).json()
logger.info("Docklet Unauthorized Response: result = %s, url = %s"%(result, url))
return result