diff --git a/random_sets/datasources.py b/random_sets/datasources.py index 4d288a1..54f56fd 100644 --- a/random_sets/datasources.py +++ b/random_sets/datasources.py @@ -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