mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
home.py: move user_id to register_ret.
Move the user_profile data section down into fetch_initial_state_data so it entirely pulls from register_ret for #3853
This commit is contained in:
@@ -134,6 +134,7 @@ def fetch_initial_state_data(user_profile, event_types, queue_id,
|
|||||||
state['avatar_url'] = avatar_url(user_profile)
|
state['avatar_url'] = avatar_url(user_profile)
|
||||||
state['can_create_streams'] = user_profile.can_create_streams()
|
state['can_create_streams'] = user_profile.can_create_streams()
|
||||||
state['is_admin'] = user_profile.is_realm_admin
|
state['is_admin'] = user_profile.is_realm_admin
|
||||||
|
state['user_id'] = user_profile.id
|
||||||
|
|
||||||
if want('realm_bot'):
|
if want('realm_bot'):
|
||||||
state['realm_bots'] = get_owned_bot_dicts(user_profile)
|
state['realm_bots'] = get_owned_bot_dicts(user_profile)
|
||||||
|
|||||||
@@ -209,7 +209,6 @@ def home_real(request):
|
|||||||
fullname = user_profile.full_name,
|
fullname = user_profile.full_name,
|
||||||
email = user_profile.email,
|
email = user_profile.email,
|
||||||
enter_sends = user_profile.enter_sends,
|
enter_sends = user_profile.enter_sends,
|
||||||
user_id = user_profile.id,
|
|
||||||
|
|
||||||
# Realm foreign key data from register_ret.
|
# Realm foreign key data from register_ret.
|
||||||
# TODO: Rename these to match register_ret values.
|
# TODO: Rename these to match register_ret values.
|
||||||
@@ -303,6 +302,7 @@ def home_real(request):
|
|||||||
'unsubscribed',
|
'unsubscribed',
|
||||||
'timezone',
|
'timezone',
|
||||||
'twenty_four_hour_time',
|
'twenty_four_hour_time',
|
||||||
|
'user_id',
|
||||||
'zulip_version',
|
'zulip_version',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user