diff options
author | Zachary Sloan | 2012-12-06 14:27:53 -0600 |
---|---|---|
committer | Zachary Sloan | 2012-12-06 14:27:53 -0600 |
commit | 6749d3c9be414ad15b9c39b2d1817ca27566d959 (patch) | |
tree | ba7501fd2a6de45f52319927e634c150342d940b /wqflask/base | |
parent | a7cc1119ebfbfab3ba5260be75c87cd4496f09b7 (diff) | |
download | genenetwork2-6749d3c9be414ad15b9c39b2d1817ca27566d959.tar.gz |
Made many small changes to show_trait/data_set/search_results/trait to
remove use of the formData object and cursor
Diffstat (limited to 'wqflask/base')
-rwxr-xr-x | wqflask/base/data_set.py | 7 | ||||
-rwxr-xr-x | wqflask/base/trait.py | 4 |
2 files changed, 6 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 68f5e5ed..14e4055e 100755 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -42,12 +42,13 @@ def create_dataset(dataset_name): #cursor = db_conn.cursor() print("dataset_name:", dataset_name) - dataset_type = g.db.execute(""" + query = """ SELECT DBType.Name FROM DBList, DBType - WHERE DBList.Name = %s and + WHERE DBList.Name = '%s' and DBType.Id = DBList.DBTypeId - """, (dataset_name)).fetchone().Name + """ % (escape(dataset_name)) + dataset_type = g.db.execute(query).fetchone().Name #dataset_type = cursor.fetchone()[0] print("[blubber] dataset_type:", pf(dataset_type)) diff --git a/wqflask/base/trait.py b/wqflask/base/trait.py index d3753fc1..d0158ebd 100755 --- a/wqflask/base/trait.py +++ b/wqflask/base/trait.py @@ -24,7 +24,7 @@ class GeneralTrait: def __init__(self, **kw): print("in GeneralTrait") - self.dataset = kw.get('dataset', None) # database object + self.dataset = kw.get('dataset', None) # database name self.name = kw.get('name', None) # Trait ID, ProbeSet ID, Published ID, etc. self.cellid = kw.get('cellid', None) self.identification = kw.get('identification', 'un-named trait') @@ -230,7 +230,7 @@ class GeneralTrait: if samplelist == None: samplelist = [] - assert self.dataset + #assert self.dataset #if self.cellid: # #Probe Data |