eschutho commented on a change in pull request #14451:
URL: https://github.com/apache/superset/pull/14451#discussion_r628558542



##########
File path: superset/databases/commands/update.py
##########
@@ -75,12 +75,21 @@ def validate(self) -> None:
         if not self._model:
             raise DatabaseNotFoundError()
         database_name: Optional[str] = self._properties.get("database_name")
+        configuration_method: Optional[str] = self._properties.get(
+            "configuration_method"
+        )
         if database_name:
             # Check database_name uniqueness
             if not DatabaseDAO.validate_update_uniqueness(
                 self._model_id, database_name
             ):
                 exceptions.append(DatabaseExistsValidationError())
+        if configuration_method:
+            if ConfigurationMethod(configuration_method) not in {

Review comment:
       Have you tested this? I believe if the value is not in the enum you're 
going to get an error, and you'll have to catch the error instead. 




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to