about summary refs log tree commit diff
path: root/wqflask
diff options
context:
space:
mode:
authorPjotr Prins2021-12-01 15:55:50 +0000
committerPjotr Prins2021-12-01 15:55:50 +0000
commit4bd10c0c4c2eddeb0e75de4da8fcbec222347fdc (patch)
tree4ccb55655cf508eb89e1146fef66617196f478fb /wqflask
parentd9843928fe5140c953078b5238c2ddb8fb12a96c (diff)
downloadgenenetwork2-4bd10c0c4c2eddeb0e75de4da8fcbec222347fdc.tar.gz
Figure out that we are using the wrong db_webqtl_s!
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/api/gen_menu.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py
index a699a484..5d239343 100644
--- a/wqflask/wqflask/api/gen_menu.py
+++ b/wqflask/wqflask/api/gen_menu.py
@@ -1,4 +1,8 @@
 from gn3.db.species import get_all_species
+
+import utility.logger
+logger = utility.logger.getLogger(__name__)
+
 def gen_dropdown_json(conn):
     """Generates and outputs (as json file) the data for the main dropdown menus on
     the home page
@@ -19,16 +23,16 @@ def get_groups(species, conn):
     with conn.cursor() as cursor:
         for species_name, _species_full_name in species:
             groups[species_name] = []
-            cursor.execute(
-                ("SELECT InbredSet.Name, InbredSet.FullName, "
+            query = ("SELECT InbredSet.Name, InbredSet.FullName, "
                  "IFNULL(InbredSet.Family, 'None') "
                  "FROM InbredSet, Species WHERE Species.Name = '{}' "
                  "AND InbredSet.SpeciesId = Species.Id GROUP by "
                  "InbredSet.Name ORDER BY IFNULL(InbredSet.FamilyOrder, "
                  "InbredSet.FullName) ASC, IFNULL(InbredSet.Family, "
                  "InbredSet.FullName) ASC, InbredSet.FullName ASC, "
-                 "InbredSet.MenuOrderId ASC")
-                .format(species_name))
+                 "InbredSet.MenuOrderId ASC").format(species_name)
+            # logger.debug(query)
+            cursor.execute(query)
             results = cursor.fetchall()
             for result in results:
                 family_name = "Family:" + str(result[2])