diff options
-rw-r--r-- | wqflask/base/data_set.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/wqflask/base/data_set.py b/wqflask/base/data_set.py index 02e6cefe..9685e33e 100644 --- a/wqflask/base/data_set.py +++ b/wqflask/base/data_set.py @@ -784,7 +784,8 @@ class DataSet: else: query = "SELECT {}.Name".format(escape(dataset_type)) data_start_pos = 1 - query += ', '.join(temp) + if len(temp) > 0: + query = query + ", " + ', '.join(temp) query += ' FROM ({}, {}XRef, {}Freeze) '.format(*mescape(dataset_type, self.type, self.type)) |