Skip to content

Commit

Permalink
fix(sqllab): error with lazy_gettext for tab titles (apache#25469)
Browse files Browse the repository at this point in the history
  • Loading branch information
nytai authored Sep 30, 2023
1 parent 85251f8 commit ddde178
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions superset/views/sql_lab/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from flask_appbuilder import expose
from flask_appbuilder.models.sqla.interface import SQLAInterface
from flask_appbuilder.security.decorators import has_access, has_access_api
from flask_babel import lazy_gettext as _
from flask_babel import gettext as __
from sqlalchemy import and_

from superset import db
Expand Down Expand Up @@ -90,7 +90,7 @@ def post(self) -> FlaskResponse:
user_id=get_user_id(),
# This is for backward compatibility
label=query_editor.get("name")
or query_editor.get("title", _("Untitled Query")),
or query_editor.get("title", __("Untitled Query")),
active=True,
database_id=query_editor["dbId"],
schema=query_editor.get("schema"),
Expand Down

0 comments on commit ddde178

Please sign in to comment.