diff --git a/superset/views/core.py b/superset/views/core.py index ecbd13df32673..ca7dae3ee51e7 100755 --- a/superset/views/core.py +++ b/superset/views/core.py @@ -2014,10 +2014,7 @@ def sync_druid_source(self) -> FlaskResponse: # pylint: disable=no-self-use ] DruidCluster = DruidDatasource.cluster_class # pylint: disable=invalid-name if not user: - err_msg = __( - "Can't find User '%(name)s', please ask your admin " "to create one.", - name=user_name, - ) + err_msg = __("Can't find user, please ask your admin to create one.") logger.error(err_msg, exc_info=True) return json_error_response(err_msg) cluster = ( @@ -2026,10 +2023,7 @@ def sync_druid_source(self) -> FlaskResponse: # pylint: disable=no-self-use .one_or_none() ) if not cluster: - err_msg = __( - "Can't find DruidCluster with cluster_name = " "'%(name)s'", - name=cluster_name, - ) + err_msg = __("Can't find DruidCluster") logger.error(err_msg, exc_info=True) return json_error_response(err_msg) try: @@ -2377,7 +2371,6 @@ def results_exec(key: str) -> FlaskResponse: ) def stop_query(self) -> FlaskResponse: client_id = request.form.get("client_id") - query = db.session.query(Query).filter_by(client_id=client_id).one() if query.status in [ QueryStatus.FAILED, @@ -2385,9 +2378,7 @@ def stop_query(self) -> FlaskResponse: QueryStatus.TIMED_OUT, ]: logger.warning( - "Query with client_id %s could not be stopped: " - "query already complete", - str(client_id), + "Query with client_id could not be stopped: query already complete", ) return self.json_response("OK")