Skip to content

Commit 744d947

Browse files
committed
Set skip_invalid=True when constructing figure wtih get_figure
This restores the pre v3 behavior of silently ignoring invalid properties when retrieving a figure from plot.ly
1 parent b8103f3 commit 744d947

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

plotly/tools.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,10 +1364,7 @@ def _pad(s, cell_len=cell_len):
13641364

13651365
def get_graph_obj(obj, obj_type=None):
13661366
"""Returns a new graph object.
1367-
1368-
OLD FUNCTION: this will *silently* strip out invalid pieces of the object.
1369-
NEW FUNCTION: no striping of invalid pieces anymore - only raises error
1370-
on unrecognized graph_objs
1367+
This will *silently* strip out invalid pieces of the object.
13711368
"""
13721369
# TODO: Deprecate or move. #283
13731370
from plotly.graph_objs import graph_objs
@@ -1377,7 +1374,7 @@ def get_graph_obj(obj, obj_type=None):
13771374
raise exceptions.PlotlyError(
13781375
"'{}' is not a recognized graph_obj.".format(obj_type)
13791376
)
1380-
return cls(obj)
1377+
return cls(obj, skip_invalid=True)
13811378

13821379

13831380
def validate(obj, obj_type):

0 commit comments

Comments
 (0)