Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Issue #60: Fix SQL query that returns same brother multiple times during #63

Merged
merged 1 commit into from

1 participant

Kyle Rogers
Kyle Rogers
Owner

resume list if that brother meets more than one 'Major' criteria.

Kyle Rogers rogerskw Issue #60: Fix SQL query that returns same brother multiple times during
resume list if that brother meets more than one 'Major' criteria.
75fe1b5
Kyle Rogers rogerskw merged commit d32b5e5 into from
Kyle Rogers rogerskw deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 9, 2014
  1. Kyle Rogers

    Issue #60: Fix SQL query that returns same brother multiple times during

    rogerskw authored
    resume list if that brother meets more than one 'Major' criteria.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  info/views.py
2  info/views.py
View
@@ -92,7 +92,7 @@ def resumes(request):
major_reqs = Q()
for major_request in major_requests:
major_reqs = major_reqs | Q(majors__majorName=major_request)
- brothers = Brother.objects.filter(major_reqs, grad_year_reqs).order_by('lastName', 'firstName', 'middleName')
+ brothers = Brother.objects.filter(major_reqs, grad_year_reqs).order_by('lastName', 'firstName', 'middleName').distinct()
majors = Major.objects.all().order_by('majorName')
c = Context({'brothers': brothers, 'majors': majors, 'years': years})
t = loader.get_template('resume_list.html')
Something went wrong with that request. Please try again.