Skip to content

Commit

Permalink
Fix i18n string
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdan-dbx committed Apr 10, 2020
1 parent 5b21869 commit 1e8443a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
1 change: 0 additions & 1 deletion superset-frontend/src/SqlLab/actions/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,6 @@ export function fetchQueryResults(query, displayLimit) {
})
.then(({ text = '{}' }) => {
const bigIntJson = JSONbig.parse(text);
// TODO(bk): update query object with tmp_schema_name
return dispatch(querySuccess(query, bigIntJson));
})
.catch(response =>
Expand Down
9 changes: 6 additions & 3 deletions superset-frontend/src/SqlLab/components/ResultSet.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,19 @@ export default class ResultSet extends React.PureComponent {
// Async queries
let tmpSchema = query.tempSchema;
let tmpTable = query.tempTableName;
// Sync queries, query.results.query contains source of truth for them.
// Sync queries, query.results.query contains the source of truth for them.
if (query.results && query.results.query) {
tmpTable = query.results.query.tempTable;
tmpSchema = query.results.query.tempSchema;
}
return (
<div>
<Alert bsStyle="info">
{t('Table')} [<strong>{tmpSchema}.{tmpTable}</strong>] {t('was created')}{' '}
&nbsp;
{t('Table')} [
<strong>
{tmpSchema}.{tmpTable}
</strong>
] {t('was created')} &nbsp;
<ButtonGroup>
<Button
bsSize="small"
Expand Down
1 change: 0 additions & 1 deletion superset-frontend/src/SqlLab/reducers/sqlLab.js
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ export default function sqlLabReducer(state = {}, action) {
if (action.results.data) {
rows = action.results.data.length;
}

const alts = {
endDttm: now(),
progress: 100,
Expand Down
5 changes: 3 additions & 2 deletions superset/views/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,12 @@ def validate_sqlatable(table: models.SqlaTable) -> None:
logger.exception(f"Got an error in pre_add for {table.name}")
raise Exception(
_(
"Table [{}] could not be found, "
"Table [%{table}s] could not be found, "
"please double check your "
"database connection, schema, and "
"table name, error: {}"
).format(table.name, str(ex))
)


def create_table_permissions(table: models.SqlaTable) -> None:
Expand All @@ -192,7 +193,7 @@ def create_table_permissions(table: models.SqlaTable) -> None:
security_manager.add_permission_view_menu("schema_access", table.schema_perm)


def get_user_roles():
def get_user_roles() -> List[Role]:
if g.user.is_anonymous:
public_role = conf.get("AUTH_ROLE_PUBLIC")
return [security_manager.find_role(public_role)] if public_role else []
Expand Down

0 comments on commit 1e8443a

Please sign in to comment.