0001-use-explicit-in-lookup-25557.patch
src/authentic2/manager/forms.py | ||
---|---|---|
448 | 448 |
# get possible OUs from this list |
449 | 449 |
related_query_name = self.queryset.model._meta.get_field('ou').related_query_name() |
450 | 450 |
objects_ou_qs = get_ou_model().objects.filter( |
451 |
**{related_query_name: self.queryset}).distinct() |
|
451 |
**{"%s__in" % related_query_name: self.queryset}).distinct()
|
|
452 | 452 |
# to combine queryset with distinct, each queryset must have the distinct flag |
453 | 453 |
self.ou_qs = (self.ou_qs.distinct() | objects_ou_qs) |
454 | 454 | |
455 |
- |