Skip to content

Commit

Permalink
depreciated api endpoint (apache#19524)
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi authored and philipher29 committed Jun 9, 2022
1 parent c99d9f3 commit 634e5b5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions superset/views/sql_lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
import os
import logging

import simplejson as json
from flask import g, redirect, request, Response
from flask_appbuilder import expose
Expand All @@ -31,6 +32,8 @@

from .base import BaseSupersetView, DeleteMixin, json_success, SupersetModelView

logger = logging.getLogger(__name__)


class SavedQueryView(SupersetModelView, DeleteMixin):
datamodel = SQLAInterface(SavedQuery)
Expand Down Expand Up @@ -319,4 +322,7 @@ class SqlLab(BaseSupersetView):
@has_access
def my_queries(self) -> FlaskResponse: # pylint: disable=no-self-use
"""Assigns a list of found users to the given role."""
return redirect(os.environ["APP_PREFIX"]+"/savedqueryview/list/?_flt_0_user={}".format(g.user.get_id()))
logger.warning(
"This endpoint is deprecated and will be removed in the next major release"
)
return redirect("/savedqueryview/list/?_flt_0_user={}".format(g.user.get_id()))

0 comments on commit 634e5b5

Please sign in to comment.