Add more information to error message

(imported from commit 0917d5c2ed1b156603ce53aaec88ecbe26f5f39c)
This commit is contained in:
Zev Benjamin 2012-10-12 11:12:47 -04:00
parent c4d35280ea
commit 7a305c1882
1 changed files with 1 additions and 1 deletions

View File

@ -396,7 +396,7 @@ def send_message_backend(request, user_profile, sender):
else: else:
# This is actually a personal message # This is actually a personal message
if not User.objects.filter(email=recipient_data): if not User.objects.filter(email=recipient_data):
return json_error("Invalid email") return json_error("Invalid email '%s'" % (recipient_data))
recipient_user = User.objects.get(email=recipient_data) recipient_user = User.objects.get(email=recipient_data)
recipient_user_profile = UserProfile.objects.get(user=recipient_user) recipient_user_profile = UserProfile.objects.get(user=recipient_user)