populate_db: Use do_create_realm for creating lear realm.

This commit is contained in:
Vishnu KS 2021-04-27 14:57:36 +00:00 committed by Tim Abbott
parent acffc0ae0a
commit 0e554a6400
1 changed files with 2 additions and 6 deletions

View File

@ -330,18 +330,14 @@ class Command(BaseCommand):
) )
RealmDomain.objects.create(realm=mit_realm, domain="mit.edu") RealmDomain.objects.create(realm=mit_realm, domain="mit.edu")
lear_realm = Realm.objects.create( lear_realm = do_create_realm(
string_id="lear", string_id="lear",
name="Lear & Co.", name="Lear & Co.",
emails_restricted_to_domains=False, emails_restricted_to_domains=False,
invite_required=False, invite_required=False,
plan_type=Realm.SELF_HOSTED,
org_type=Realm.CORPORATE, org_type=Realm.CORPORATE,
) )
RealmAuditLog.objects.create(
realm=lear_realm,
event_type=RealmAuditLog.REALM_CREATED,
event_time=lear_realm.date_created,
)
# Default to allowing all members to send mentions in # Default to allowing all members to send mentions in
# large streams for the test suite to keep # large streams for the test suite to keep