Skip to content
Snippets Groups Projects
Unverified Commit c6f629ae authored by ysde's avatar ysde Committed by GitHub
Browse files

Merge pull request #28 from PaddleHQ/ooaklee-dict-fix

handle situation where response[1] is a dict not str. Fixes crash in issue #27
parents 20ed8343 9f49a391
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,10 @@ def get_folder_id_from_old_folder_url(folder_url):
uid = matches.group(1)
response = get_folder(uid)
folder_data = json.loads(response[1])
if isinstance(response[1],dict):
folder_data = response[1]
else:
folder_data = json.loads(response[1])
return folder_data['id']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment