Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
betodealmeida committed May 19, 2023
1 parent f5cd423 commit cae6057
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions superset-frontend/src/views/CRUD/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,9 @@ export function useSingleViewResource<D extends object = any>(
loading: true,
});

const baseEndpoint = `/api/v1/${resourceName}/${resourceID}`;
const endpoint =
path_suffix !== ''
? `/api/v1/${resourceName}/${resourceID}/${path_suffix}`
: `/api/v1/${resourceName}/${resourceID}`;
path_suffix !== '' ? `${baseEndpoint}/${path_suffix}` : baseEndpoint;
return SupersetClient.get({
endpoint,
})
Expand Down
4 changes: 1 addition & 3 deletions superset/databases/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,6 @@ class DatabaseRestApi(BaseSupersetModelRestApi):
"driver",
"force_ctas_schema",
"impersonate_user",
"extra",
"server_cert",
"is_managed_externally",
"engine_information",
]
Expand Down Expand Up @@ -243,7 +241,7 @@ def get_connection(self, pk: int) -> Response:
"""Get database connection info.
---
get:
description: >-
summary: >-
Get a database connection info
parameters:
- in: path
Expand Down
2 changes: 0 additions & 2 deletions tests/unit_tests/databases/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,10 @@ def test_database_connection(
"supports_file_upload": False,
},
"expose_in_sqllab": True,
"extra": '{\n "metadata_params": {},\n "engine_params": {},\n "metadata_cache_timeout": {},\n "schemas_allowed_for_file_upload": []\n}\n',
"force_ctas_schema": None,
"id": 1,
"impersonate_user": False,
"is_managed_externally": False,
"server_cert": None,
"uuid": "02feae18-2dd6-4bb4-a9c0-49e9d4f29d58",
},
}
Expand Down

0 comments on commit cae6057

Please sign in to comment.