Skip to content

Loading…

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

Merged
merged 1 commit into from

1 participant

@rogerskw

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

@rogerskw 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
@rogerskw rogerskw merged commit d32b5e5 into master
@rogerskw rogerskw deleted the iss60 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. @rogerskw

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

    rogerskw committed
    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
View
2 info/views.py
@@ -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.