Skip to content

Instantly share code, notes, and snippets.

@mattdeboard
Created October 11, 2011 14:13
Show Gist options
  • Save mattdeboard/1278180 to your computer and use it in GitHub Desktop.
Save mattdeboard/1278180 to your computer and use it in GitHub Desktop.
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