def do_change_realm_domain(realm_domain: RealmDomain, allow_subdomains: bool) -> None:
    realm_domain.allow_subdomains = allow_subdomains
    realm_domain.save(update_fields=['allow_subdomains'])
    event = dict(type='realm_domains', op='change', realm_domain=dict(domain=realm_domain.domain, allow_subdomains=realm_domain.allow_subdomains))
    send_event(realm_domain.realm, event, active_user_ids(realm_domain.realm_id))
def do_change_realm_domain(realm_domain: RealmDomain, allow_subdomains: bool) -> None:
    realm_domain.allow_subdomains = allow_subdomains
    realm_domain.save(update_fields=['allow_subdomains'])
    event = dict(type='realm_domains', op='change', realm_domain=dict(domain=realm_domain.domain, allow_subdomains=realm_domain.allow_subdomains))
    send_event(realm_domain.realm, event, active_user_ids(realm_domain.realm_id))