File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -797,7 +797,7 @@ def __init__(self):
797797 self .class_model .rowsInserted .connect (self ._class_count_changed )
798798 self .class_model .rowsRemoved .connect (self ._class_count_changed )
799799
800- if self .data is None :
800+ if not self .data :
801801 self .data = []
802802 self .__buffer = np .zeros ((0 , 3 ))
803803 elif isinstance (self .data , np .ndarray ):
Original file line number Diff line number Diff line change @@ -71,3 +71,10 @@ def test_sparse_data(self):
7171 self .assertTrue (self .widget .Warning .sparse_not_supported .is_shown ())
7272 self .send_signal ("Data" , None )
7373 self .assertFalse (self .widget .Warning .sparse_not_supported .is_shown ())
74+
75+ def test_load_empty_data (self ):
76+ """
77+ It should not crash when old workflow with no data is loaded.
78+ GH-2399
79+ """
80+ self .create_widget (OWPaintData , stored_settings = {"data" : []})
You can’t perform that action at this time.
0 commit comments