betodealmeida commented on a change in pull request #11884:
URL:
https://github.com/apache/incubator-superset/pull/11884#discussion_r537680649
##########
File path: superset/databases/schemas.py
##########
@@ -429,3 +433,12 @@ class ImportV1DatabaseSchema(Schema):
extra = fields.Nested(ImportV1DatabaseExtraSchema)
uuid = fields.UUID(required=True)
version = fields.String(required=True)
+
+ # pylint: disable=no-self-use, unused-argument
+ @validates_schema
+ def validate_password(self, data: Dict[str, Any], **kwargs: Any) -> None:
+ """If sqlalchemy_uri has a masked password, password is required"""
+ uri = data["sqlalchemy_uri"]
Review comment:
Yes, if `sqlalchemy_uri` is not there the validator will raise an
exception before calling this method, since we have:
```python
sqlalchemy_uri = fields.String(required=True)
```
----------------------------------------------------------------
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]