mirror of https://github.com/zulip/zulip.git
import: Fix propagation of subdomain error messages.
The previous logic would provide a very confusing error message if the subdomain was already in use.
This commit is contained in:
parent
1fa82c2fcd
commit
d041bb0674
|
@ -77,8 +77,11 @@ import a database dump from one or more JSON files."""
|
|||
|
||||
try:
|
||||
check_subdomain_available(subdomain, allow_reserved_subdomain)
|
||||
except ValidationError:
|
||||
raise CommandError("Subdomain reserved: pass --allow-reserved-subdomain to use.")
|
||||
except ValidationError as e:
|
||||
raise CommandError(
|
||||
e.messages[0]
|
||||
+ "\nPass --allow-reserved-subdomain to override subdomain restrictions."
|
||||
)
|
||||
|
||||
paths = []
|
||||
for path in options["export_paths"]:
|
||||
|
|
Loading…
Reference in New Issue