mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
refactor: Rename build_user -> build_user_profile.
This makes greps less confusing.
This commit is contained in:
@@ -30,8 +30,8 @@ from zerver.data_import.import_util import (
|
||||
build_recipients,
|
||||
build_stream,
|
||||
build_subscriptions,
|
||||
build_user,
|
||||
build_user_message,
|
||||
build_user_profile,
|
||||
build_zerver_realm,
|
||||
create_converted_data_files,
|
||||
write_avatar_png,
|
||||
@@ -125,7 +125,7 @@ def convert_user_data(user_handler: UserHandler,
|
||||
else:
|
||||
avatar_source = 'G'
|
||||
|
||||
return build_user(
|
||||
return build_user_profile(
|
||||
avatar_source=avatar_source,
|
||||
date_joined=date_joined,
|
||||
delivery_email=delivery_email,
|
||||
|
||||
@@ -3,7 +3,7 @@ from typing import Any, Dict, List
|
||||
from django.utils.timezone import now as timezone_now
|
||||
|
||||
from zerver.data_import.import_util import (
|
||||
build_user,
|
||||
build_user_profile,
|
||||
)
|
||||
|
||||
class UserHandler:
|
||||
@@ -47,7 +47,7 @@ class UserHandler:
|
||||
date_joined = int(timezone_now().timestamp())
|
||||
timezone = 'UTC'
|
||||
|
||||
user = build_user(
|
||||
user = build_user_profile(
|
||||
avatar_source=avatar_source,
|
||||
date_joined=date_joined,
|
||||
delivery_email=delivery_email,
|
||||
|
||||
@@ -27,19 +27,19 @@ def build_zerver_realm(realm_id: int, realm_subdomain: str, time: float,
|
||||
realm_dict['authentication_methods'] = auth_methods
|
||||
return[realm_dict]
|
||||
|
||||
def build_user(avatar_source: str,
|
||||
date_joined: Any,
|
||||
delivery_email: str,
|
||||
email: str,
|
||||
full_name: str,
|
||||
id: int,
|
||||
is_active: bool,
|
||||
is_realm_admin: bool,
|
||||
is_guest: bool,
|
||||
is_mirror_dummy: bool,
|
||||
realm_id: int,
|
||||
short_name: str,
|
||||
timezone: Optional[str]) -> ZerverFieldsT:
|
||||
def build_user_profile(avatar_source: str,
|
||||
date_joined: Any,
|
||||
delivery_email: str,
|
||||
email: str,
|
||||
full_name: str,
|
||||
id: int,
|
||||
is_active: bool,
|
||||
is_realm_admin: bool,
|
||||
is_guest: bool,
|
||||
is_mirror_dummy: bool,
|
||||
realm_id: int,
|
||||
short_name: str,
|
||||
timezone: Optional[str]) -> ZerverFieldsT:
|
||||
pointer = -1
|
||||
obj = UserProfile(
|
||||
avatar_source=avatar_source,
|
||||
|
||||
Reference in New Issue
Block a user