mirror of https://github.com/apache/superset.git
fixing db connection (#16899)
This commit is contained in:
parent
4da4fe4136
commit
904c506591
|
@ -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;
|
||||
|
|
|
@ -331,6 +331,8 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
|
|||
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()
|
||||
|
|
Loading…
Reference in New Issue