From 9c5b1f48914da17c08fc95da858e3d06e41721bb Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Wed, 30 Nov 2022 16:34:58 +0300 Subject: 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. --- wqflask/base/data_set/dataset.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'wqflask') 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 -- cgit v1.2.3