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

Skip to content

Commit e3688cc

Browse files
committed
Fix: When fileopt is supplied, use it
1 parent b4b5cde commit e3688cc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

plotly/plotly/plotly.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@ def _plot_option_logic(plot_options):
132132
options.update(_DEFAULT_PLOT_OPTIONS)
133133
options.update(_plot_options)
134134
options.update(plot_options)
135-
if 'filename' in plot_options:
135+
if ('filename' in plot_options
136+
and 'fileopt' not in _plot_options
137+
and 'fileopt' not in plot_options):
136138
options['fileopt'] = 'overwrite'
137139
return options
138140

@@ -280,7 +282,7 @@ def get_figure(file_owner, file_id, raw=False):
280282
headers = {'plotly-username': username,
281283
'plotly-apikey': api_key,
282284
'plotly-version': '2.0',
283-
'plotly-platform': 'pythonz'}
285+
'plotly-platform': 'python'}
284286

285287
try:
286288
test_if_int = int(file_id)

0 commit comments

Comments
 (0)