mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix(sqllab): Fix tab state (#20947)
* Fix tab state * Update sql_lab.py
This commit is contained in:
parent
ac585821d8
commit
c06d5eb70c
@ -139,7 +139,9 @@ class TabStateView(BaseSupersetView):
|
|||||||
query_editor = json.loads(request.form["queryEditor"])
|
query_editor = json.loads(request.form["queryEditor"])
|
||||||
tab_state = TabState(
|
tab_state = TabState(
|
||||||
user_id=get_user_id(),
|
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,
|
active=True,
|
||||||
database_id=query_editor["dbId"],
|
database_id=query_editor["dbId"],
|
||||||
schema=query_editor.get("schema"),
|
schema=query_editor.get("schema"),
|
||||||
|
Loading…
Reference in New Issue
Block a user