mirror of https://github.com/apache/superset.git
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"])
|
||||
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"),
|
||||
|
|
Loading…
Reference in New Issue