mirror of https://github.com/zulip/zulip.git
custom_fields: Fix confusing comments for do_update_..._if_changed.
d66cbd2832
added these mentioning
"always_notify" for some reason, but always_notify clearly isn't a real
thing in this context so the comments need to be fixed to eliminate this
potential source of confusion.
This commit is contained in:
parent
6702f434ca
commit
932c846454
|
@ -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.
|
||||
continue
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
|
Loading…
Reference in New Issue