Skip to content
Browse files

hackish fix for 500 error caused by get_messages not respecting recip…

…ient_username and author_username args
  • Loading branch information...
1 parent 3ac5737 commit 9a8108544694d75bc30ba444afc250ca092a795c @trey0 trey0 committed Nov 10, 2011
Showing with 2 additions and 3 deletions.
  1. +2 −3 geocamTalk/views.py
View
5 geocamTalk/views.py
@@ -95,14 +95,13 @@ def get_messages(request, recipient_username=None, author_username=None):
if since is not None:
since_dt = since
messages = TalkMessage.getMessages(recipient, author).filter(pk__gt=since_dt)
- message_count = TalkMessage.getMessages(request.user).filter(pk__gt=since_dt).count()
+ message_count = TalkMessage.getMessages(recipient).filter(pk__gt=since_dt).count()
else:
messages = TalkMessage.getMessages(recipient, author)
- message_count = TalkMessage.getMessages(request.user).count()
+ message_count = TalkMessage.getMessages(recipient).count()
return timestamp, messages, message_count
-@login_required
def feed_messages(request, recipient_username=None, author_username=None):
timestamp, messages, message_count = get_messages(request, recipient_username, author_username)
return HttpResponse(json.dumps({'ts': timestamp,

0 comments on commit 9a81085

Please sign in to comment.
Something went wrong with that request. Please try again.