From 7b722f044c13d2f73652798aef2cb3387b24a1a6 Mon Sep 17 00:00:00 2001 From: zsloan Date: Thu, 18 Feb 2021 16:51:36 +0000 Subject: Fixed remaining issue with gen_menu query to also sort by CreateTime, change OrderList sort to put NULLs at bottom, and exclude datasets with public = 0 --- wqflask/wqflask/api/gen_menu.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'wqflask') diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py index e490054d..4ce19fdb 100644 --- a/wqflask/wqflask/api/gen_menu.py +++ b/wqflask/wqflask/api/gen_menu.py @@ -206,9 +206,10 @@ def build_datasets(species, group, type_name): "Species.Name = '{0}' AND Species.Id = " "InbredSet.SpeciesId AND InbredSet.Name = '{1}' " "AND ProbeSetFreeze.ProbeFreezeId = ProbeFreeze.Id " - "and Tissue.Name = '{2}' AND ProbeFreeze.TissueId = " + "AND Tissue.Name = '{2}' AND ProbeFreeze.TissueId = " "Tissue.Id and ProbeFreeze.InbredSetId = InbredSet.Id " - "ORDER BY ProbeSetFreeze.OrderList ").format(species, group, type_name)).fetchall() + "AND ProbeSetFreeze.public > 0 " + "ORDER BY -ProbeSetFreeze.OrderList DESC, ProbeSetFreeze.CreateTime DESC").format(species, group, type_name)).fetchall() datasets = [] for dataset_info in results: -- cgit v1.2.3