Skip to content

Commit

Permalink
Fixes CI errors
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Mar 20, 2024
1 parent 35835e7 commit 3177f66
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const DrillDetailMenuItems = ({
}: DrillDetailMenuItemsProps) => {
const drillToDetailDisabled = useSelector<RootState, boolean | undefined>(
({ datasources }) =>
datasources[formData.datasource]?.database.disable_drill_to_detail,
datasources[formData.datasource]?.database?.disable_drill_to_detail,
);

const [modalFilters, setFilters] = useState<BinaryQueryObjectFilterClause[]>(
Expand Down
2 changes: 1 addition & 1 deletion superset-frontend/src/dashboard/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export type Datasource = Dataset & {
uid: string;
column_types: GenericDataType[];
table_name: string;
database: Database;
database?: Database;
};
export type DatasourcesState = {
[key: string]: Datasource;
Expand Down
6 changes: 3 additions & 3 deletions superset/databases/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1364,9 +1364,9 @@ def available(self) -> Response:
and getattr(engine_spec, "default_driver") in drivers
):
payload["parameters"] = engine_spec.parameters_json_schema()
payload["sqlalchemy_uri_placeholder"] = (
engine_spec.sqlalchemy_uri_placeholder
)
payload[
"sqlalchemy_uri_placeholder"
] = engine_spec.sqlalchemy_uri_placeholder

available_databases.append(payload)

Expand Down
4 changes: 3 additions & 1 deletion superset/models/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ def get_effective_user(self, object_url: URL) -> str | None:
return (
username
if (username := get_username())
else object_url.username if self.impersonate_user else None
else object_url.username
if self.impersonate_user
else None
)

@contextmanager
Expand Down

0 comments on commit 3177f66

Please sign in to comment.