diff --git a/zephyr/lib/actions.py b/zephyr/lib/actions.py index 273abd2f4b..4c84251817 100644 --- a/zephyr/lib/actions.py +++ b/zephyr/lib/actions.py @@ -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') diff --git a/zephyr/views.py b/zephyr/views.py index 15a5ea13a8..29051550cf 100644 --- a/zephyr/views.py +++ b/zephyr/views.py @@ -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)