fix bug where flatten() excluded the option
This commit is contained in:
1 parent
5874309d9c
commit
38fd1e9356
1 file changed
+2
-2
@@ -122,9 +122,9 @@ class DataSource:
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# If there is no data for the specified option, stop now.
|
# If there is no data for the specified option, stop now.
|
||||||
flattened = []
|
flattened = [option]
|
||||||
if not self.data[option]:
|
if not self.data[option]:
|
||||||
return [option]
|
flattened
|
||||||
|
|
||||||
if hasattr(self.data[option], 'keys'):
|
if hasattr(self.data[option], 'keys'):
|
||||||
# if the option is a dict, we assume the values are lists; we select a random item
|
# if the option is a dict, we assume the values are lists; we select a random item
|
||||||
|
|||||||
Reference in new issue
Block a user