mirror of https://github.com/zulip/zulip.git
import: Fix typo in zerver_customprofilefieldvalue table name.
Apparently, we were doing this slightly wrong.
This commit is contained in:
parent
c1cd0b710e
commit
328136344a
|
@ -58,7 +58,7 @@ ALL_ZERVER_TABLES = [
|
|||
'zerver_attachment_messages',
|
||||
'zerver_client',
|
||||
'zerver_customprofilefield',
|
||||
'zerver_customprofilefield_value',
|
||||
'zerver_customprofilefieldvalue',
|
||||
'zerver_defaultstream',
|
||||
'zerver_huddle',
|
||||
'zerver_message',
|
||||
|
@ -451,7 +451,7 @@ def get_realm_config() -> Config:
|
|||
)
|
||||
|
||||
Config(
|
||||
table='zerver_customprofilefield_value',
|
||||
table='zerver_customprofilefieldvalue',
|
||||
model=CustomProfileFieldValue,
|
||||
normal_parent=user_profile_config,
|
||||
parent_key='user_profile__in',
|
||||
|
|
|
@ -56,7 +56,7 @@ id_maps = {
|
|||
'useractivityinterval': {},
|
||||
'usermessage': {},
|
||||
'customprofilefield': {},
|
||||
'customprofilefield_value': {},
|
||||
'customprofilefieldvalue': {},
|
||||
'attachment': {},
|
||||
} # type: Dict[str, Dict[int, int]]
|
||||
|
||||
|
@ -528,13 +528,13 @@ def do_import_realm(import_dir: Path, subdomain: str) -> Realm:
|
|||
related_table="customprofilefield")
|
||||
bulk_import_model(data, CustomProfileField, 'zerver_customprofilefield')
|
||||
|
||||
re_map_foreign_keys(data, 'zerver_customprofilefield_value', 'user_profile',
|
||||
re_map_foreign_keys(data, 'zerver_customprofilefieldvalue', 'user_profile',
|
||||
related_table="user_profile")
|
||||
re_map_foreign_keys(data, 'zerver_customprofilefield_value', 'field',
|
||||
re_map_foreign_keys(data, 'zerver_customprofilefieldvalue', 'field',
|
||||
related_table="customprofilefield")
|
||||
update_model_ids(CustomProfileFieldValue, data, 'zerver_customprofilefield_value',
|
||||
related_table="customprofilefield_value")
|
||||
bulk_import_model(data, CustomProfileFieldValue, 'zerver_customprofilefield_value')
|
||||
update_model_ids(CustomProfileFieldValue, data, 'zerver_customprofilefieldvalue',
|
||||
related_table="customprofilefieldvalue")
|
||||
bulk_import_model(data, CustomProfileFieldValue, 'zerver_customprofilefieldvalue')
|
||||
|
||||
# Import uploaded files and avatars
|
||||
import_uploads(os.path.join(import_dir, "avatars"), processing_avatars=True)
|
||||
|
|
|
@ -89,7 +89,7 @@ def slack_workspace_to_realm(domain_name: str, realm_id: int, user_list: List[Ze
|
|||
|
||||
# Custom profile fields
|
||||
realm['zerver_customprofilefield'] = zerver_customprofilefield
|
||||
realm['zerver_customprofilefield_value'] = zerver_customprofilefield_value
|
||||
realm['zerver_customprofilefieldvalue'] = zerver_customprofilefield_value
|
||||
|
||||
realm['zerver_defaultstream'] = channels_to_zerver_stream_fields[0]
|
||||
realm['zerver_stream'] = channels_to_zerver_stream_fields[1]
|
||||
|
|
Loading…
Reference in New Issue