1
0
mirror of https://github.com/django/django.git synced 2025-10-29 16:46:11 +00:00

Fixed #31223 -- Added __class_getitem__() to Manager and QuerySet.

This commit is contained in:
sobolevn
2020-02-02 13:15:58 +03:00
committed by Carlton Gibson
parent fc0b48d2e7
commit 578c03b276
4 changed files with 21 additions and 0 deletions

View File

@@ -323,6 +323,9 @@ class QuerySet:
qs._fetch_all()
return qs._result_cache[0]
def __class_getitem__(cls, *args, **kwargs):
return cls
def __and__(self, other):
self._merge_sanity_check(other)
if isinstance(other, EmptyQuerySet):