Skip to content

Commit

Permalink
change the API on the invitations method
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Oct 27, 2009
1 parent bb7ad69 commit e206f01
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions friends/managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e206f01

Please sign in to comment.