Skip to content

Commit

Permalink
Change in the query
Browse files Browse the repository at this point in the history
  • Loading branch information
jay committed Sep 4, 2014
1 parent 42f85cd commit f546c38
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tavern/views.py
Expand Up @@ -30,7 +30,7 @@ def index(request, template='home.html'):
joined_groups = request.user.tavern_groups.all()
unjoined_groups = list(set(all_groups) - set(joined_groups))
upcoming_events = Event.objects.filter(starts_at__gt=today_date())
events = Attendee.objects.filter(user_id=request.user.id)
events = Attendee.objects.filter(user=request.user)
events_rsvped = [event.event for event in events]

context = {'joined_groups': joined_groups,
Expand Down Expand Up @@ -137,7 +137,7 @@ def get_context_data(self, **kwargs):
context = super(EventDetail, self).get_context_data(**kwargs)
event = context['event']
try:
attendee = Attendee.objects.get(user__id=self.request.user.id,
attendee = Attendee.objects.get(user=self.request.user,
event=event)
if attendee.rsvp_status == 'yes':
message = "You are attending this event."
Expand Down

0 comments on commit f546c38

Please sign in to comment.