mirror of
https://github.com/apache/superset.git
synced 2026-04-18 07:35:09 +00:00
bug fix (#17019)
This commit is contained in:
@@ -551,6 +551,10 @@ const DatabaseModal: FunctionComponent<DatabaseModalProps> = ({
|
||||
});
|
||||
// cast the new encrypted extra object into a string
|
||||
dbToUpdate.encrypted_extra = JSON.stringify(additionalEncryptedExtra);
|
||||
// this needs to be added by default to gsheets
|
||||
if (dbToUpdate.engine === 'gsheets') {
|
||||
dbToUpdate.impersonate_user = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (dbToUpdate?.parameters?.catalog) {
|
||||
|
||||
@@ -153,9 +153,12 @@ class GSheetsEngineSpec(SqliteEngineSpec):
|
||||
cls, parameters: GSheetsParametersType,
|
||||
) -> List[SupersetError]:
|
||||
errors: List[SupersetError] = []
|
||||
encrypted_credentials = json.loads(
|
||||
parameters.get("service_account_info") or "{}"
|
||||
)
|
||||
encrypted_credentials = parameters.get("service_account_info") or "{}"
|
||||
|
||||
# On create the encrypted credentials are a string,
|
||||
# at all other times they are a dict
|
||||
if isinstance(encrypted_credentials, str):
|
||||
encrypted_credentials = json.loads(encrypted_credentials)
|
||||
|
||||
table_catalog = parameters.get("catalog", {})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user