dpgaspar commented on a change in pull request #8448: Add UI-only database
configuration method for extended authorization scenarios
URL:
https://github.com/apache/incubator-superset/pull/8448#discussion_r338924651
##########
File path: superset/views/database/__init__.py
##########
@@ -253,3 +263,12 @@ def check_extra(self, db):
"is not configured correctly. The key "
"{} is invalid.".format(key)
)
+
+ def check_encrypted_extra(self, db):
+ # this will check whether json.loads(secure_extra) can succeed
+ try:
+ extra = db.get_encrypted_extra()
+ except Exception as e:
+ raise Exception(
+ "Secure Extra field cannot be decoded as JSON.
{}".format(str(e))
Review comment:
nit: use f strings
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]