mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Rename models.get_realm_by_string_id to get_realm.
Finishes the refactoring started in c1bbd8d. The goal of the refactoring is
to change the argument to get_realm from a Realm.domain to a
Realm.string_id. The steps were
* Add a new function, get_realm_by_string_id.
* Change all calls to get_realm to use get_realm_by_string_id instead.
* Remove get_realm.
* (This commit) Rename get_realm_by_string_id to get_realm.
Part of a larger migration to remove the Realm.domain field entirely.
This commit is contained in:
@@ -13,7 +13,7 @@ from zerver.lib.actions import internal_send_message
|
||||
from zerver.lib.redis_utils import get_redis_client
|
||||
from zerver.lib.response import json_success, json_error, json_response
|
||||
from zerver.lib.validator import check_dict
|
||||
from zerver.models import get_realm_by_string_id, get_user_profile_by_email, \
|
||||
from zerver.models import get_realm, get_user_profile_by_email, \
|
||||
get_realm_by_email_domain, UserProfile, Realm
|
||||
from .error_notify import notify_server_error, notify_browser_error
|
||||
|
||||
@@ -49,7 +49,7 @@ def get_ticket_number():
|
||||
def submit_feedback(request, deployment, message=REQ(validator=check_dict([]))):
|
||||
# type: (HttpRequest, Deployment, Dict[str, Text]) -> HttpResponse
|
||||
domainish = message["sender_domain"]
|
||||
if get_realm_by_string_id("zulip") not in deployment.realms.all():
|
||||
if get_realm("zulip") not in deployment.realms.all():
|
||||
domainish += u" via " + deployment.name
|
||||
subject = "%s" % (message["sender_email"],)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user