mirror of
https://github.com/zulip/zulip.git
synced 2025-10-23 04:52:12 +00:00
import: Fix ordering of subdomain availability check.
When you're importing with --destroy-rebuild-database, we need to check subdomain availability after we've cleared out the database; otherwise, trying to reuse the same subdomain doesn't work.
This commit is contained in:
@@ -65,7 +65,6 @@ import a database dump from one or more JSON files."""
|
||||
if subdomain is None:
|
||||
print("Enter subdomain!")
|
||||
exit(1)
|
||||
check_subdomain_available(subdomain)
|
||||
|
||||
if options["destroy_rebuild_database"]:
|
||||
print("Rebuilding the database!")
|
||||
@@ -75,6 +74,8 @@ import a database dump from one or more JSON files."""
|
||||
for model in models_to_import:
|
||||
self.new_instance_check(model)
|
||||
|
||||
check_subdomain_available(subdomain)
|
||||
|
||||
for path in options['export_files']:
|
||||
if not os.path.exists(path):
|
||||
print("Directory not found: '%s'" % (path,))
|
||||
|
Reference in New Issue
Block a user