From 679051788a475dfcefd4cb93dc82ec3a4b86edc3 Mon Sep 17 00:00:00 2001 From: Alexander Kabui Date: Tue, 16 Nov 2021 19:54:55 +0300 Subject: use comprehension list;fix typo --- wqflask/base/data_set.py | 8 +++----- 1 file 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 -- cgit v1.2.3