Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 096073e

Browse files
committed
Use web_url in response instead of plotly_domain in session\nplotly_domain is not necessarily the same as plotly_api_domain, so parsing grid_id into plotly_domain could give the wrong URL
1 parent e5a3b31 commit 096073e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plotly/plotly/plotly.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -840,15 +840,13 @@ def upload(cls, grid, filename,
840840

841841
response_columns = res['file']['cols']
842842
grid_id = res['file']['fid']
843+
grid_url = res['file']['web_url']
843844

844845
# mutate the grid columns with the id's returned from the server
845846
cls._fill_in_response_column_ids(grid, response_columns, grid_id)
846847

847848
grid.id = grid_id
848849

849-
plotly_domain = get_config()['plotly_domain']
850-
grid_url = '{0}/~{1}'.format(plotly_domain, grid_id.replace(':', '/'))
851-
852850
if meta is not None:
853851
meta_ops.upload(meta, grid=grid)
854852

0 commit comments

Comments
 (0)