Skip to content

Commit fdaf441

Browse files
bmaranvillegvwilson
authored andcommitted
use a copy of the DataValidator in BaseFigure, with local set_uid attribute value
1 parent 6bd2bb3 commit fdaf441

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plotly/basedatatypes.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,10 @@ class is a subclass of both BaseFigure and widgets.DOMWidget.
524524
# ### Construct data validator ###
525525
# This is the validator that handles importing sequences of trace
526526
# objects
527-
self._data_validator = DataValidator(set_uid=self._set_trace_uid)
527+
# We make a copy because we are overriding the set_uid attribute
528+
# and do not want to alter all other uses of the cached DataValidator
529+
self._data_validator = copy(DataValidator)
530+
self._data_validator.set_uid = self._set_trace_uid
528531

529532
# ### Import traces ###
530533
data = self._data_validator.validate_coerce(

0 commit comments

Comments
 (0)