diff --git a/django/django/db/models/query.py b/django/django/db/models/query.py
index 5b9f504..4d42a75 100644
a
|
b
|
class QuerySet(object):
|
240 | 240 | raise IndexError, e.args |
241 | 241 | |
242 | 242 | def __and__(self, other): |
| 243 | if hasattr(other, '__rand__'): |
| 244 | return other.__rand__(self) |
243 | 245 | self._merge_sanity_check(other) |
244 | 246 | if isinstance(other, EmptyQuerySet): |
245 | 247 | return other._clone() |
… |
… |
class QuerySet(object):
|
248 | 250 | return combined |
249 | 251 | |
250 | 252 | def __or__(self, other): |
| 253 | if hasattr(other, '__ror__'): |
| 254 | return other.__ror__(self) |
251 | 255 | self._merge_sanity_check(other) |
252 | 256 | combined = self._clone() |
253 | 257 | if isinstance(other, EmptyQuerySet): |
diff --git a/res/patches/django/added-__rand__-and-__ror__-support-to-QuerySet.patch b/res/patches/django/added-__rand__-and-__ror__-support-to-QuerySet.patch
index 765fd46..e69de29 100644
a
|
b
|
|
1 | | diff --git a/django/db/models/query.py b/django/db/models/query.py |
2 | | index 6b341ba..f2638cd 100644 |
3 | | --- a/django/db/models/query.py |
4 | | +++ b/django/db/models/query.py |
5 | | @@ -131,12 +131,18 @@ class QuerySet(object): |
6 | | raise IndexError, e.args |
7 | | |
8 | | def __and__(self, other): |
9 | | + if hasattr(other, '__rand__'): |
10 | | + return other.__rand__(self) |
11 | | + |
12 | | self._merge_sanity_check(other) |
13 | | combined = self._clone() |
14 | | combined.query.combine(other.query, sql.AND) |
15 | | return combined |
16 | | |
17 | | def __or__(self, other): |
18 | | + if hasattr(other, '__ror__'): |
19 | | + return other.__ror__(self) |
20 | | + |
21 | | self._merge_sanity_check(other) |
22 | | combined = self._clone() |
23 | | combined.query.combine(other.query, sql.OR) |