Skip to content

Commit 6d5e1d7

Browse files
committed
'obj' was sometimes not None, but still did not have _valid_props attribute
See plotly.tests.test_core.test_errors.test_dict_path_errors.test_described_subscript_error_on_type_error for an example
1 parent f5846c7 commit 6d5e1d7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/python/plotly/plotly/basedatatypes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4777,7 +4777,7 @@ def __contains__(self, prop):
47774777
else:
47784778
return False
47794779
else:
4780-
if obj is not None and p in obj._valid_props:
4780+
if hasattr(obj, '_valid_props') and p in obj._valid_props:
47814781
obj = obj[p]
47824782
else:
47834783
return False

0 commit comments

Comments
 (0)