diff options
author | Pjotr Prins | 2016-06-23 06:27:32 +0000 |
---|---|---|
committer | Pjotr Prins | 2016-06-23 06:27:32 +0000 |
commit | b00cd99942cb33a6ca8c16d9bd3ecf4d053fcc52 (patch) | |
tree | 56d57feebba331f5b873ecc672f61704c5075efb /wqflask/db/webqtlDatabaseFunction.py | |
parent | aa873c386aee39ad2d3da1ce1598a2214b05b27b (diff) | |
download | genenetwork2-b00cd99942cb33a6ca8c16d9bd3ecf4d053fcc52.tar.gz |
Added REST call for species_id
Diffstat (limited to 'wqflask/db/webqtlDatabaseFunction.py')
-rw-r--r-- | wqflask/db/webqtlDatabaseFunction.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/wqflask/db/webqtlDatabaseFunction.py b/wqflask/db/webqtlDatabaseFunction.py index 567e7375..d6aabc41 100644 --- a/wqflask/db/webqtlDatabaseFunction.py +++ b/wqflask/db/webqtlDatabaseFunction.py @@ -58,4 +58,7 @@ def retrieve_species(group): def retrieve_species_id(group): - return g.db.execute("select SpeciesId from InbredSet where Name = %s", (group)).fetchone()[0] + + result = fetch1("select SpeciesId from InbredSet where Name = '%s'" % (group),"/cross/"+group+".json",lambda r: r["species_id"])[0] + logger.debug("retrieve_species_id result:",result) + return result |