(self, other)
| 520 | return combined |
| 521 | |
| 522 | def __xor__(self, other): |
| 523 | self._check_operator_queryset(other, "^") |
| 524 | self._merge_sanity_check(other) |
| 525 | if isinstance(self, EmptyQuerySet): |
| 526 | return other |
| 527 | if isinstance(other, EmptyQuerySet): |
| 528 | return self |
| 529 | query = ( |
| 530 | self |
| 531 | if self.query.can_filter() |
| 532 | else self.model._base_manager.filter(pk__in=self.values("pk")) |
| 533 | ) |
| 534 | combined = query._chain() |
| 535 | combined._merge_known_related_objects(other) |
| 536 | if not other.query.can_filter(): |
| 537 | other = other.model._base_manager.filter(pk__in=other.values("pk")) |
| 538 | combined.query.combine(other.query, sql.XOR) |
| 539 | return combined |
| 540 | |
| 541 | #################################### |
| 542 | # METHODS THAT DO DATABASE QUERIES # |
nothing calls this directly
no test coverage detected