mirror of
https://github.com/getredash/redash.git
synced 2025-12-22 19:03:26 -05:00
Fix: Query results in public dashboard not loading when query ends with semicolon
This commit is contained in:
committed by
Manik Somayaji
parent
113146e4b8
commit
7a50b18d31
@@ -308,15 +308,13 @@ class BaseSQLQueryRunner(BaseQueryRunner):
|
||||
return str(parsed_query)
|
||||
|
||||
def apply_auto_limit(self, query_text, should_apply_auto_limit):
|
||||
queries = split_sql_statements(query_text)
|
||||
if should_apply_auto_limit:
|
||||
queries = split_sql_statements(query_text)
|
||||
# we only check for last one in the list because it is the one that we show result
|
||||
last_query = queries[-1]
|
||||
if self.query_is_select_no_limit(last_query):
|
||||
queries[-1] = self.add_limit_to_query(last_query)
|
||||
return combine_sql_statements(queries)
|
||||
else:
|
||||
return query_text
|
||||
return combine_sql_statements(queries)
|
||||
|
||||
|
||||
class BaseHTTPQueryRunner(BaseQueryRunner):
|
||||
|
||||
Reference in New Issue
Block a user