import: Set plan_type to SELF_HOSTED on import.

We've for a while had logic to set plan_type to LIMITED when importing
into Zulip Cloud; we need corresponding logic to set it to SELF_HOSTED
when importing into a self-hosted server.

Fixes #11541.
This commit is contained in:
Tim Abbott 2019-02-12 16:01:02 -08:00
parent 60c9f22129
commit 4d08461ab1

View File

@ -986,6 +986,8 @@ def do_import_realm(import_dir: Path, subdomain: str, processes: int=1) -> Realm
if settings.BILLING_ENABLED: if settings.BILLING_ENABLED:
do_change_plan_type(realm, Realm.LIMITED) do_change_plan_type(realm, Realm.LIMITED)
else:
do_change_plan_type(realm, Realm.SELF_HOSTED)
return realm return realm
# create_users and do_import_system_bots differ from their equivalent in # create_users and do_import_system_bots differ from their equivalent in