1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #35426 -- Updated querysets to be a required argument of GenericPrefetch.

This commit is contained in:
sobolevn
2024-05-03 11:40:50 +03:00
committed by Sarah Boyce
parent 32d163e680
commit 9a27c76021
4 changed files with 13 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ from django.db.models.query import ModelIterable, RawQuerySet
class GenericPrefetch(Prefetch):
def __init__(self, lookup, querysets=None, to_attr=None):
def __init__(self, lookup, querysets, to_attr=None):
for queryset in querysets:
if queryset is not None and (
isinstance(queryset, RawQuerySet)