Permalink
Browse files

change the API on the invitations method

  • Loading branch information...
1 parent bb7ad69 commit e206f01906c95d75a9ef12b56e9bbfcc1384aa7e @alex alex committed Oct 27, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 friends/managers.py
View
@@ -35,8 +35,8 @@ def remove(self, user1, user2):
class FriendshipInvitationManager(models.Manager):
- def invitations(self, *args, **kwargs):
- return self.filter(*args, **kwargs).exclude(status__in=(5, 6, 7))
+ def invitations(self, user):
+ return self.filter(Q(from_user=user) | Q(to_user=user)).exclude(status__in=(5, 6, 7))
def create_friendship_request(self, from_user, to_user, msg=None):
inv = self.create(from_user=from_user, to_user=to_user,

0 comments on commit e206f01

Please sign in to comment.