events: Fix can_subscribe_other_users not being set properly.

I don't understand why this didn't cause test failures in CI; this
change was clearly required and test_change_realm_property was failing
consistently for me locally.
This commit is contained in:
Tim Abbott 2018-08-21 11:20:59 -07:00
parent 6949ce1bad
commit 0068a5ccd6
1 changed files with 1 additions and 0 deletions

View File

@ -466,6 +466,7 @@ def apply_event(state: Dict[str, Any],
if (field in ['realm_create_stream_by_admins_only',
'realm_waiting_period_threshold']) and 'can_create_streams' in state:
state['can_create_streams'] = user_profile.can_create_streams()
state['can_subscribe_other_users'] = user_profile.can_subscribe_other_users()
elif event['op'] == "update_dict":
for key, value in event['data'].items():
state['realm_' + key] = value