diff --git a/jwql/website/apps/jwql/data_containers.py b/jwql/website/apps/jwql/data_containers.py index aea2a595c..d2b62121c 100644 --- a/jwql/website/apps/jwql/data_containers.py +++ b/jwql/website/apps/jwql/data_containers.py @@ -1593,7 +1593,10 @@ def get_rootnames_from_query(parameters): else: current_ins_rootfileinfos = current_ins_rootfileinfos.order_by('-root_name') - rootnames = [name[0] for name in current_ins_rootfileinfos.values_list('root_name')] + # Django is doing something wonky here. I can't call values_list with a single parameter, even with 'flat=True' as per Django Docs. + # TODO: This is hacky and should be fixed. + filtered_list = list(current_ins_rootfileinfos.values_list('root_name', 'expstart')) + rootnames = [name[0] for name in filtered_list] filtered_rootnames.extend(rootnames) return filtered_rootnames