Created
October 11, 2011 14:13
-
-
Save mattdeboard/1278180 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
result_list = [] | |
for facet in facets: | |
if not facet[1]: | |
result_list.append(jobListing.objects.none()) | |
else: | |
pks = (i.pk for i in facet[0].get_sqs()) | |
result_list.append(jobListing.objects.filter(pk__in=pks)) | |
import ipdb | |
ipdb.set_trace() | |
jqs = reduce(lambda x,y: x|y, result_list) | |
if len(jqs) == 0: | |
return redirect('/') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment