diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py
index 99663b6..783aef1 100644
a
|
b
|
class Query(object):
|
1101 | 1101 | table = table_it.next() |
1102 | 1102 | if join == table and self.alias_refcount[join] > 1: |
1103 | 1103 | continue |
1104 | | join_promote = self.promote_alias(join) |
| 1104 | join_promote = self.promote_alias(join, unconditional=True) |
1105 | 1105 | if table != join: |
1106 | 1106 | table_promote = self.promote_alias(table) |
1107 | 1107 | break |
diff --git a/tests/regressiontests/queries/tests.py b/tests/regressiontests/queries/tests.py
index 31856ba..a4586de 100644
a
|
b
|
class Queries4Tests(BaseQuerysetTest):
|
979 | 979 | Report.objects.create(name='r2', creator=a3) |
980 | 980 | Report.objects.create(name='r3') |
981 | 981 | |
| 982 | def test_ticket14876(self): |
| 983 | q1 = Report.objects.filter(Q(creator__isnull=True) | Q(creator__extra__info='e1')) |
| 984 | q2 = Report.objects.filter(Q(creator__isnull=True)) | Report.objects.filter(Q(creator__extra__info='e1')) |
| 985 | ident = lambda x: x |
| 986 | self.assertQuerysetEqual(q1, list(q2), ident) |
| 987 | |
982 | 988 | def test_ticket7095(self): |
983 | 989 | # Updates that are filtered on the model being updated are somewhat |
984 | 990 | # tricky in MySQL. This exercises that case. |