fix(sqllab): Do not strip comments when executing SQL statements (#29248)

This commit is contained in:
John Bodley
2024-06-14 09:38:36 -07:00
committed by GitHub
parent 05829cbda9
commit b50e3af07c
2 changed files with 2 additions and 3 deletions

View File

@@ -573,9 +573,9 @@ class TestSqlLab(SupersetTestCase):
assert data["status"] == "success"
data = self.run_sql(
"SELECT * FROM birth_names WHERE state = '{{ state }}' -- blabblah {{ extra1 }} {{fake.fn()}}\nLIMIT 10",
"SELECT * FROM birth_names WHERE state = '{{ state }}' -- blabblah {{ extra1 }}\nLIMIT 10",
"3",
template_params=json.dumps({"state": "CA"}),
template_params=json.dumps({"state": "CA", "extra1": "comment"}),
)
assert data["status"] == "success"