Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
custom_fields: Fix confusing comments for do_update_..._if_changed.
Mateusz Mandera932c846454b5
diff --git a/zerver/lib/actions.py b/zerver/lib/actions.pyindex 6e4c7d3bdfe..b7d296826ff 100644--- a/zerver/lib/actions.py+++ b/zerver/lib/actions.py@@ -7336,7 +7336,7 @@ def do_update_user_custom_profile_data_if_changed(if not created and field_value.value == str(field["value"]):# If the field value isn't actually being changed to a different one,- # and always_notify is disabled, we have nothing to do here for this field.+ # we have nothing to do here for this field.# Note: field_value.value is a TextField() so we need to cast field['value']# to a string for the comparison in this if.continuediff --git a/zerver/tests/test_custom_profile_data.py b/zerver/tests/test_custom_profile_data.pyindex f82fc51ab00..15e7ed2eb8a 100644--- a/zerver/tests/test_custom_profile_data.py+++ b/zerver/tests/test_custom_profile_data.py@@ -713,7 +713,7 @@ class UpdateCustomProfileFieldTest(CustomProfileFieldTestCase):with mock.patch("zerver.lib.actions.notify_user_update_custom_profile_data") as mock_notify:# Attempting to "update" the field value, when it wouldn't actually change,- # if always_notify is disabled, shouldn't trigger notify.+ # shouldn't trigger notify.do_update_user_custom_profile_data_if_changed(iago, data)mock_notify.assert_not_called()