From 16afdd0bb4be4733a98db4ee656125ccd7a14293 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 20 Feb 2014 15:57:15 -0600 Subject: Committer: root On branch master --- wqflask/maintenance/dataset/load_phenotypes.py | 40 +++++++++++++------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'wqflask/maintenance/dataset') diff --git a/wqflask/maintenance/dataset/load_phenotypes.py b/wqflask/maintenance/dataset/load_phenotypes.py index 36c14990..5847da4b 100644 --- a/wqflask/maintenance/dataset/load_phenotypes.py +++ b/wqflask/maintenance/dataset/load_phenotypes.py @@ -53,23 +53,23 @@ def main(argv): Phenotype.`Units`=%s """ cursor.execute(sql, ( - utilities.to_db_string_null(metarow[1]), - utilities.to_db_string_null(metarow[2]), - utilities.to_db_string_null(metarow[3]), - utilities.to_db_string_null(metarow[4]), - utilities.to_db_string_null(metarow[5]), - utilities.to_db_string_null(metarow[6]), - utilities.to_db_string_null(metarow[7]), - utilities.to_db_string_null(metarow[8]), - utilities.to_db_string_null(metarow[9]), - utilities.to_db_string_null(metarow[18]) + utilities.to_db_string(metarow[1], None), + utilities.to_db_string(metarow[2], None), + utilities.to_db_string(metarow[3], None), + utilities.to_db_string(metarow[4], None), + utilities.to_db_string(metarow[5], None), + utilities.to_db_string(metarow[6], None), + utilities.to_db_string(metarow[7], None), + utilities.to_db_string(metarow[8], None), + utilities.to_db_string(metarow[9], None), + utilities.to_db_string(metarow[18], None), )) rowcount = cursor.rowcount phenotypeid = con.insert_id() print "INSERT INTO Phenotype: %d record: %d" % (rowcount, phenotypeid) # Publication publicationid = None # reset - pubmed_id = utilities.to_db_string_null(metarow[0]) + pubmed_id = utilities.to_db_string(metarow[0], None) if pubmed_id: sql = """ SELECT Publication.`Id` @@ -96,15 +96,15 @@ def main(argv): Publication.`Year`=%s """ cursor.execute(sql, ( - utilities.to_db_string_null(metarow[0]), - utilities.to_db_string_null(metarow[12]), - utilities.to_db_string_null(metarow[10]), - utilities.to_db_string_null(metarow[11]), - utilities.to_db_string_null(metarow[13]), - utilities.to_db_string_null(metarow[14]), - utilities.to_db_string_null(metarow[15]), - utilities.to_db_string_null(metarow[16]), - utilities.to_db_string_null(metarow[17]), + utilities.to_db_string(metarow[0], None), + utilities.to_db_string(metarow[12], None), + utilities.to_db_string(metarow[10], None), + utilities.to_db_string(metarow[11], None), + utilities.to_db_string(metarow[13], None), + utilities.to_db_string(metarow[14], None), + utilities.to_db_string(metarow[15], None), + utilities.to_db_string(metarow[16], None), + utilities.to_db_string(metarow[17], None), )) rowcount = cursor.rowcount publicationid = con.insert_id() -- cgit v1.2.3