aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
authorBonfaceKilz2021-04-23 17:32:35 +0300
committerBonfaceKilz2021-04-23 17:42:26 +0300
commit8bad987466203baed948ba761d248e24f04ca49c (patch)
tree1f879a98d3ca7388728f7baf3eb6a00ce1273322 /wqflask
parent2114ad9e84ad7778e048b52cf865b5f031ceab88 (diff)
downloadgenenetwork2-8bad987466203baed948ba761d248e24f04ca49c.tar.gz
Rewrite For Loop in a more Pythonic way
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/wqflask/api/gen_menu.py7
1 files changed, 1 insertions, 6 deletions
diff --git a/wqflask/wqflask/api/gen_menu.py b/wqflask/wqflask/api/gen_menu.py
index 18afc5ad..eaddecd7 100644
--- a/wqflask/wqflask/api/gen_menu.py
+++ b/wqflask/wqflask/api/gen_menu.py
@@ -23,12 +23,7 @@ def get_species():
"""Build species list"""
results = g.db.execute(
"SELECT Name, MenuName FROM Species ORDER BY OrderId").fetchall()
-
- species = []
- for result in results:
- species.append([str(result[0]), str(result[1])])
-
- return species
+ return [[name, menu_name] for name, menu_name in results]
def get_groups(species):