Browse Source

[raz] Append SAS token only if present in response

Harshg999 4 years ago
parent
commit
0b658e2cbd
1 changed files with 3 additions and 1 deletions
  1. 3 1
      desktop/core/src/desktop/lib/rest/raz_http_client.py

+ 3 - 1
desktop/core/src/desktop/lib/rest/raz_http_client.py

@@ -45,7 +45,9 @@ class RazHttpClient(HttpClient):
 
     response = raz_client.get_url(action=http_method, path=url, headers=headers)
 
-    signed_url = url + ('?' if '?' not in url else '&') + response['token']
+    signed_url = url
+    if response.get('token') is not None:
+      signed_url += ('?' if '?' not in url else '&') + response.get('token')
 
     # Required because `self._make_url` is called in base class execute method also
     signed_path = path + signed_url.partition(path)[2]