aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Kabui2021-11-16 19:54:55 +0300
committerAlexander Kabui2021-11-16 19:54:55 +0300
commit679051788a475dfcefd4cb93dc82ec3a4b86edc3 (patch)
tree01149e631115fc5d78186ecb5176814a4ad74bd4
parent06fbab6427cadf7706da4e954874a7e5da1bd32d (diff)
downloadgenenetwork2-679051788a475dfcefd4cb93dc82ec3a4b86edc3.tar.gz
use comprehension list;fix typo
-rw-r--r--wqflask/base/data_set.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 37f35121..553530d4 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -747,9 +747,7 @@ class DataSet:
and Species.name = '{}'
""".format(create_in_clause(self.samplelist), *mescape(self.group.species))
results = dict(g.db.execute(query).fetchall())
- sample_ids = [results.get(item) for item in self.samplelist]
-
- sample_ids = [ids for ids in sample_ids if ids is not None]
+ sample_ids = [results.get(item) for item in self.samplelist if item is not None]
# MySQL limits the number of tables that can be used in a join to 61,
# so we break the sample ids into smaller chunks
@@ -1263,7 +1261,7 @@ def query_table_timestamp(dataset_type: str):
# computation data and actions
query_update_time = f"""
- SELECT UPDATE_TIME FROM information_schfema.tables
+ SELECT UPDATE_TIME FROM information_schema.tables
WHERE TABLE_SCHEMA = 'db_webqtl_s'
AND TABLE_NAME = '{dataset_type}Data'
"""
@@ -1317,4 +1315,4 @@ def fetch_cached_results(dataset_name: str, dataset_type: str):
return json.load(file_handler)
except FileNotFoundError:
- pass \ No newline at end of file
+ pass