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



##########
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:
       cool. can you maybe assert the error message, too, to validate that 
you're getting the right error?




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