Fix being unable to send messages with a trailing comma in recipients list.

(imported from commit 5c075c4aa1da8c2a153b33ed4d061fac88de48e7)
This commit is contained in:
Tim Abbott 2012-10-24 14:25:45 -04:00
parent 9e7e4fda91
commit 75d150efc7
1 changed files with 2 additions and 0 deletions

View File

@ -566,6 +566,8 @@ def send_message_backend(request, user_profile, sender, client_name=None):
recipient_profile_ids = set() recipient_profile_ids = set()
for recipient in huddle_recipients: for recipient in huddle_recipients:
if recipient == "":
continue
try: try:
recipient_profile_ids.add(UserProfile.objects.get(user__email=recipient).id) recipient_profile_ids.add(UserProfile.objects.get(user__email=recipient).id)
except UserProfile.DoesNotExist: except UserProfile.DoesNotExist: