aboutsummaryrefslogtreecommitdiff
path: root/wqflask
diff options
context:
space:
mode:
Diffstat (limited to 'wqflask')
-rw-r--r--wqflask/base/data_set.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py
index 4d708e59..6c6deea9 100644
--- a/wqflask/base/data_set.py
+++ b/wqflask/base/data_set.py
@@ -749,8 +749,12 @@ class DataSet:
(self.group.species,)
)
results = dict(cursor.fetchall())
- sample_ids = [results.get(item)
- for item in self.samplelist if item is not None]
+ sample_ids = [
+ sample_id for sample_id in
+ (results.get(item) for item in self.samplelist
+ if item is not None)
+ if sample_id 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