mirror of https://github.com/zulip/zulip.git
Fix recent display recipient change.
(imported from commit d0f7e7313437a510150f941b0464c972b34a8847)
This commit is contained in:
parent
d374312509
commit
293c8dcff8
|
@ -22,9 +22,9 @@ def get_display_recipient(recipient):
|
||||||
zephyr_class = ZephyrClass.objects.get(id=recipient.type_id)
|
zephyr_class = ZephyrClass.objects.get(id=recipient.type_id)
|
||||||
return zephyr_class.name
|
return zephyr_class.name
|
||||||
elif recipient.type == Recipient.HUDDLE:
|
elif recipient.type == Recipient.HUDDLE:
|
||||||
user_list = [UserProfile.objects.get(user=s.userprofile) for s in
|
user_profile_list = [UserProfile.objects.get(user=s.userprofile) for s in
|
||||||
Subscription.objects.filter(recipient=recipient)]
|
Subscription.objects.filter(recipient=recipient)]
|
||||||
return [{'email': user.email} for user in user_list]
|
return [{'email': user_profile.user.email} for user_profile in user_profile_list]
|
||||||
else:
|
else:
|
||||||
user = User.objects.get(id=recipient.type_id)
|
user = User.objects.get(id=recipient.type_id)
|
||||||
return user.email
|
return user.email
|
||||||
|
|
Loading…
Reference in New Issue