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