mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 04:23:46 +00:00
export: Support export of Custom Profile Field.
This commit is contained in:
@@ -15,8 +15,8 @@ from zerver.lib.avatar_hash import user_avatar_path_from_ids
|
||||
from zerver.models import UserProfile, Realm, Client, Huddle, Stream, \
|
||||
UserMessage, Subscription, Message, RealmEmoji, RealmFilter, \
|
||||
RealmDomain, Recipient, DefaultStream, get_user_profile_by_id, \
|
||||
UserPresence, UserActivity, UserActivityInterval, \
|
||||
get_display_recipient, Attachment, get_system_bot
|
||||
UserPresence, UserActivity, UserActivityInterval, CustomProfileField, \
|
||||
CustomProfileFieldValue, get_display_recipient, Attachment, get_system_bot
|
||||
from zerver.lib.parallel import run_parallel
|
||||
from typing import Any, Callable, Dict, List, Optional, Set, Tuple, \
|
||||
Iterable
|
||||
@@ -57,6 +57,8 @@ ALL_ZERVER_TABLES = [
|
||||
'zerver_attachment',
|
||||
'zerver_attachment_messages',
|
||||
'zerver_client',
|
||||
'zerver_customprofilefield',
|
||||
'zerver_customprofilefield_value',
|
||||
'zerver_defaultstream',
|
||||
'zerver_huddle',
|
||||
'zerver_message',
|
||||
@@ -387,6 +389,13 @@ def get_realm_config() -> Config:
|
||||
parent_key='realm_id__in',
|
||||
)
|
||||
|
||||
Config(
|
||||
table='zerver_customprofilefield',
|
||||
model=CustomProfileField,
|
||||
normal_parent=realm_config,
|
||||
parent_key='realm_id__in',
|
||||
)
|
||||
|
||||
Config(
|
||||
table='zerver_realmemoji',
|
||||
model=RealmEmoji,
|
||||
@@ -441,6 +450,13 @@ def get_realm_config() -> Config:
|
||||
parent_key='user_profile__in',
|
||||
)
|
||||
|
||||
Config(
|
||||
table='zerver_customprofilefield_value',
|
||||
model=CustomProfileFieldValue,
|
||||
normal_parent=user_profile_config,
|
||||
parent_key='user_profile__in',
|
||||
)
|
||||
|
||||
Config(
|
||||
table='zerver_useractivity',
|
||||
model=UserActivity,
|
||||
|
||||
Reference in New Issue
Block a user