diff options
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 |