You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by ly...@apache.org on 2022/08/02 22:09:10 UTC
[superset] branch master updated: fix(sqllab): Fix tab state (#20947)
This is an automated email from the ASF dual-hosted git repository.
lyndsi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git
The following commit(s) were added to refs/heads/master by this push:
new c06d5eb70c fix(sqllab): Fix tab state (#20947)
c06d5eb70c is described below
commit c06d5eb70ce4ee40e3433b3d6e3bf5e4501e50fe
Author: Lyndsi Kay Williams <55...@users.noreply.github.com>
AuthorDate: Tue Aug 2 17:08:59 2022 -0500
fix(sqllab): Fix tab state (#20947)
* Fix tab state
* Update sql_lab.py
---
superset/views/sql_lab.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/superset/views/sql_lab.py b/superset/views/sql_lab.py
index f83c4521e7..1042b8f920 100644
--- a/superset/views/sql_lab.py
+++ b/superset/views/sql_lab.py
@@ -139,7 +139,9 @@ class TabStateView(BaseSupersetView):
query_editor = json.loads(request.form["queryEditor"])
tab_state = TabState(
user_id=get_user_id(),
- label=query_editor.get("title", "Untitled Query"),
+ # This is for backward compatibility
+ label=query_editor.get("name")
+ or query_editor.get("title", "Untitled Query"),
active=True,
database_id=query_editor["dbId"],
schema=query_editor.get("schema"),