Skip to content

Commit

Permalink
fixing db connection (apache#16899)
Browse files Browse the repository at this point in the history
  • Loading branch information
AAfghahi authored and Emmanuel Bavoux committed Nov 14, 2021
1 parent cb4e0c5 commit 92aa909
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion superset-frontend/src/views/CRUD/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ export function useSingleViewResource<D extends object = any>(
.then(
({ json = {} }) => {
updateState({
resource: json.result,
resource: { ...json.result, id: json.id },
error: null,
});
return json.result;
Expand Down
2 changes: 2 additions & 0 deletions superset/databases/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ def put(self, pk: int) -> Response:
changed_model = UpdateDatabaseCommand(g.user, pk, item).run()
# Return censored version for sqlalchemy URI
item["sqlalchemy_uri"] = changed_model.sqlalchemy_uri
if changed_model.parameters:
item["parameters"] = changed_model.parameters
return self.response(200, id=changed_model.id, result=item)
except DatabaseNotFoundError:
return self.response_404()
Expand Down

0 comments on commit 92aa909

Please sign in to comment.