feat: keep modal open when saving database failed (#11618)

This commit is contained in:
Jesse Yang
2020-11-12 16:10:14 -08:00
committed by GitHub
parent 3ad65bc163
commit ec8ccd4cf1
10 changed files with 142 additions and 44 deletions

View File

@@ -131,15 +131,12 @@ def sqlalchemy_uri_validator(value: str) -> str:
"""
try:
make_url(value.strip())
except (ArgumentError, AttributeError):
except (ArgumentError, AttributeError, ValueError):
raise ValidationError(
[
_(
"Invalid connection string, a valid string usually follows:"
"'DRIVER://USER:PASSWORD@DB-HOST/DATABASE-NAME'"
"<p>"
"Example:'postgresql://user:password@your-postgres-db/database'"
"</p>"
"Invalid connection string, a valid string usually follows: "
"dirver://user:password@database-host/database-name"
)
]
)