Skip to content

Commit

Permalink
The helper function can expect a user instead of expecting a username.
Browse files Browse the repository at this point in the history
  • Loading branch information
akshar-raaj committed Sep 10, 2014
1 parent 974b8cf commit fd2b68d
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions tavern/models.py
Expand Up @@ -3,7 +3,6 @@
from django.contrib.auth.models import User
from django.utils import timezone
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404

from .slugify import unique_slugify

Expand Down Expand Up @@ -132,7 +131,6 @@ def __unicode__(self):
return "%s - %s" % (self.user.first_name, self.event.name)


def get_unjoined_groups(username):
user = get_object_or_404(User, username=username)
def get_unjoined_groups(user):
user_unjoined_groups = TavernGroup.objects.exclude(members=user)
return user_unjoined_groups

0 comments on commit fd2b68d

Please sign in to comment.