Use user_profile instead of leaked object from list comprehension

(imported from commit 7d8467b104fc80d52fa829eb0ff949b1bd0e578f)
This commit is contained in:
Leo Franchi 2013-10-25 10:20:28 -04:00
parent 207c98bc2d
commit b26f158020
1 changed files with 2 additions and 2 deletions

View File

@ -1673,8 +1673,8 @@ def do_events_register(user_profile, user_client, apply_markdown=True,
'full_name' : profile.full_name}
for profile in get_active_user_profiles_by_realm(user_profile.realm)]
if event_types is None or "onboarding_steps" in event_types:
ret['onboarding_steps'] = [{'email' : profile.email,
'steps' : profile.onboarding_steps}]
ret['onboarding_steps'] = {'email' : user_profile.email,
'steps' : user_profile.onboarding_steps}
if event_types is None or "subscription" in event_types:
subscriptions, unsubscribed, email_dict = gather_subscriptions_helper(user_profile)
ret['subscriptions'] = subscriptions