Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

exports: Use realm for RealmAuditLog in realm exports.

Steve Howella2c4931316d1
diff --git a/zerver/lib/export.py b/zerver/lib/export.py
index afc9f76ed3a..82f8f2ac236 100644
--- a/zerver/lib/export.py
+++ b/zerver/lib/export.py
@@ -655,6 +655,13 @@ def get_realm_config() -> Config:
include_rows="realm_id__in",
)
+ Config(
+ table="zerver_realmauditlog",
+ model=RealmAuditLog,
+ normal_parent=realm_config,
+ include_rows="realm_id__in",
+ )
+
Config(
table="zerver_realmemoji",
model=RealmEmoji,
@@ -875,13 +882,6 @@ def add_user_profile_child_configs(user_profile_config: Config) -> None:
include_rows="user_profile_id__in",
)
- Config(
- table="zerver_realmauditlog",
- model=RealmAuditLog,
- normal_parent=user_profile_config,
- include_rows="modified_user_id__in",
- )
-
Config(
table="zerver_useractivity",
model=UserActivity,
@@ -1956,6 +1956,13 @@ def get_single_user_config() -> Config:
include_rows="user_id__in",
)
+ Config(
+ table="zerver_realmauditlog",
+ model=RealmAuditLog,
+ normal_parent=user_profile_config,
+ include_rows="modified_user_id__in",
+ )
+
add_user_profile_child_configs(user_profile_config)
return user_profile_config