diff --git a/conservancy/podjango/views.py b/conservancy/podjango/views.py index 359ce810..28e7ffa9 100644 --- a/conservancy/podjango/views.py +++ b/conservancy/podjango/views.py @@ -18,6 +18,7 @@ # from datetime import datetime from functools import reduce +from operator import or_ from django.shortcuts import get_object_or_404, render from django.views.generic.list import ListView @@ -27,7 +28,7 @@ from .models import Cast, CastTag def OR_filter(field_name, objs): from django.db.models import Q - return reduce(lambda x, y: x | y, + return reduce(or_, [Q(**{field_name: x.id}) for x in objs]) def last_name(person):