Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Remove unnecessary loop of notification_setting_types.
Sahil Batra526de3f7d1da
diff --git a/zerver/lib/create_user.py b/zerver/lib/create_user.pyindex db4eb646d16..6fe28f5a0ff 100644--- a/zerver/lib/create_user.py+++ b/zerver/lib/create_user.py@@ -21,10 +21,6 @@ def copy_user_settings(source_profile: UserProfile, target_profile: UserProfile)value = getattr(source_profile, settings_name)setattr(target_profile, settings_name, value)- for settings_name in UserProfile.notification_setting_types:- value = getattr(source_profile, settings_name)- setattr(target_profile, settings_name, value)-setattr(target_profile, "full_name", source_profile.full_name)setattr(target_profile, "enter_sends", source_profile.enter_sends)setattr(target_profile, "timezone", source_profile.timezone)diff --git a/zerver/tests/test_event_system.py b/zerver/tests/test_event_system.pyindex 3c71c9b867a..b5770dd3fb1 100644--- a/zerver/tests/test_event_system.py+++ b/zerver/tests/test_event_system.py@@ -557,9 +557,6 @@ class FetchInitialStateDataTest(ZulipTestCase):for prop in UserProfile.property_types:self.assertNotIn(prop, result)self.assertIn(prop, result["user_settings"])- for prop in UserProfile.notification_setting_types:- self.assertNotIn(prop, result)- self.assertIn(prop, result["user_settings"])result = fetch_initial_state_data(user_profile=hamlet,@@ -569,9 +566,6 @@ class FetchInitialStateDataTest(ZulipTestCase):for prop in UserProfile.property_types:self.assertIn(prop, result)self.assertIn(prop, result["user_settings"])- for prop in UserProfile.notification_setting_types:- self.assertIn(prop, result)- self.assertIn(prop, result["user_settings"])class ClientDescriptorsTest(ZulipTestCase):