diff options
author | Munyoki Kilyungi | 2022-11-30 16:34:58 +0300 |
---|---|---|
committer | BonfaceKilz | 2022-11-30 16:45:25 +0300 |
commit | 9c5b1f48914da17c08fc95da858e3d06e41721bb (patch) | |
tree | 11a34d7a87b009fd615085d829a0c37cd989596f /wqflask/base | |
parent | a1552491f5880d4bb94e0b3f8cf52832fa1a842b (diff) | |
download | genenetwork2-9c5b1f48914da17c08fc95da858e3d06e41721bb.tar.gz |
Remove check for shortnames/fullnames in probeset metadata query
Some rows in InfoFiles have NULL values thereby causing an exception
to be raised. All InfoFiles.DB_Name are unique.
* wqflask/base/data_set/dataset.py (DataSet.get_accession_id): Remove
shortname/fullname check in query.
Diffstat (limited to 'wqflask/base')
-rw-r--r-- | wqflask/base/data_set/dataset.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/wqflask/base/data_set/dataset.py b/wqflask/base/data_set/dataset.py index dfe09921..d34a3d85 100644 --- a/wqflask/base/data_set/dataset.py +++ b/wqflask/base/data_set/dataset.py @@ -94,9 +94,8 @@ class DataSet: __accession_id_dict, = itertools.islice( query_sql(conn, ("SELECT InfoFiles.GN_AccesionId AS accession_id " - f"FROM InfoFiles WHERE InfoFiles.InfoPageName = '{conn.escape_string(self.name).decode()}' " - f"AND InfoFiles.DB_Name = '{conn.escape_string(self.fullname).decode()}' " - f"OR InfoFiles.DB_Name = '{conn.escape_string(self.shortname).decode()}'") + "FROM InfoFiles WHERE InfoFiles.InfoPageName = " + f"'{conn.escape_string(self.name).decode()}'") ), 1) else: # The Value passed is not present raise LookupError |