From 64e61d9463817240e4c39be63665cecd3c1df2ce Mon Sep 17 00:00:00 2001 From: michaelbabyn Date: Fri, 14 Jun 2019 20:47:16 -0400 Subject: [PATCH 1/2] only set plotlyServerURL using the plotly_domain in the .config file if one isn't specified in the config dict passed to iplot/plot --- plotly/offline/offline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index f3e6730fb88..048db2dddf5 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -161,7 +161,8 @@ def _get_jconfig(config): plotly_platform_url = plotly.tools.get_config_plotly_server_url() - clean_config['plotlyServerURL'] = plotly_platform_url + if not clean_config.get('plotlyServerURL'): + clean_config['plotlyServerURL'] = plotly_platform_url if (plotly_platform_url != 'https://plot.ly' and clean_config.get('linkText', None) == 'Export to plot.ly'): From d60252047bf14573c266861256e64878f8c07d34 Mon Sep 17 00:00:00 2001 From: michaelbabyn Date: Sat, 15 Jun 2019 09:25:49 -0400 Subject: [PATCH 2/2] make it clear that the default in clean_config.get is None --- plotly/offline/offline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plotly/offline/offline.py b/plotly/offline/offline.py index 048db2dddf5..a1d24530b80 100644 --- a/plotly/offline/offline.py +++ b/plotly/offline/offline.py @@ -161,7 +161,7 @@ def _get_jconfig(config): plotly_platform_url = plotly.tools.get_config_plotly_server_url() - if not clean_config.get('plotlyServerURL'): + if not clean_config.get('plotlyServerURL', None): clean_config['plotlyServerURL'] = plotly_platform_url if (plotly_platform_url != 'https://plot.ly' and