mirror of https://github.com/zulip/zulip.git
Remove remaining direct usage of the User model.
(imported from commit c494b4e32761e9ce57115da918a86a1d6a0b6971)
This commit is contained in:
parent
5dbe8b4c17
commit
a8e89962d8
|
@ -195,7 +195,7 @@ def do_send_message(message, rendered_content=None, no_log=False,
|
|||
message.recipient.type == Recipient.HUDDLE):
|
||||
recipients = [s.user_profile for
|
||||
s in Subscription.objects.select_related(
|
||||
"user_profile", "user_profile__user").filter(recipient=message.recipient, active=True)]
|
||||
"user_profile").filter(recipient=message.recipient, active=True)]
|
||||
else:
|
||||
raise ValueError('Bad recipient type')
|
||||
|
||||
|
|
|
@ -1396,7 +1396,7 @@ def get_status_list(requesting_user_profile):
|
|||
|
||||
for presence in UserPresence.objects.filter(
|
||||
user_profile__realm=requesting_user_profile.realm).select_related(
|
||||
'user_profile', 'user_profile__user', 'client'):
|
||||
'user_profile', 'client'):
|
||||
|
||||
user_statuses[presence.user_profile.email][presence.client.name] = \
|
||||
presence_to_dict(presence)
|
||||
|
|
Loading…
Reference in New Issue