fix bug where flatten() excluded the option

This commit is contained in:
evilchili 2024-01-19 00:02:35 -08:00
parent 5874309d9c
commit 38fd1e9356

View File

@ -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