Changeset 7395
- Timestamp:
- 03/31/08 19:25:32 (5 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/queryset-refactor/django/db/models/query.py
r7346 r7395 119 119 raise IndexError, e.args 120 120 121 def _merge_sanity_check(self, other):122 """123 Checks that we are merging two comparable queryset classes.124 """125 if self.__class__ is not other.__class__:126 raise TypeError("Cannot merge querysets of different types ('%s' and '%s'."127 % (self.__class__.__name__, other.__class__.__name__))128 129 121 def __and__(self, other): 130 122 self._merge_sanity_check(other) … … 471 463 self._iter = None 472 464 465 def _merge_sanity_check(self, other): 466 """ 467 Checks that we are merging two comparable queryset classes. 468 """ 469 if self.__class__ is not other.__class__: 470 raise TypeError("Cannot merge querysets of different types ('%s' and '%s'." 471 % (self.__class__.__name__, other.__class__.__name__)) 472 473 473 # Use the backend's QuerySet class if it defines one. Otherwise, use _QuerySet. 474 474 if connection.features.uses_custom_queryset:
