소스 검색

[raz] Append SAS token only if present in response

Harshg999 4 년 전
부모
커밋
0b658e2cbd
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  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]