Skip to content

Commit 0a66eab

Browse files
committed
queryset-refactor: Made on of the tests use more portable SQL to help Oracle.
Patch from Ian Kelly. Fixed django#7058. git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7440 bcc190cf-cafb-0310-a4f2-bffc1f526a37
1 parent 88488e5 commit 0a66eab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/regressiontests/queries/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ class Meta:
473473
>>> Ranking.objects.extra(tables=['django_site'], order_by=['-django_site.id', 'rank'])
474474
[<Ranking: 1: a3>, <Ranking: 2: a2>, <Ranking: 3: a1>]
475475
476-
>>> qs = Ranking.objects.extra(select={'good': 'rank > 2'})
476+
>>> qs = Ranking.objects.extra(select={'good': 'case when rank > 2 then 1 else 0 end'})
477477
>>> [o.good for o in qs.extra(order_by=('-good',))] == [True, False, False]
478478
True
479479
>>> qs.extra(order_by=('-good', 'id'))

0 commit comments

Comments
 (0)