From b00cd99942cb33a6ca8c16d9bd3ecf4d053fcc52 Mon Sep 17 00:00:00 2001 From: Pjotr Prins Date: Thu, 23 Jun 2016 06:27:32 +0000 Subject: Added REST call for species_id --- wqflask/db/webqtlDatabaseFunction.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3