mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #30986 -- Fixed queryset crash when filtering against boolean RawSQL expressions on Oracle.
This commit is contained in:
parent
22a7a406c9
commit
8685e764ef
2 changed files with 11 additions and 1 deletions
|
@ -92,6 +92,14 @@ class BasicExpressionsTests(TestCase):
|
|||
2,
|
||||
)
|
||||
|
||||
def test_filtering_on_rawsql_that_is_boolean(self):
|
||||
self.assertEqual(
|
||||
Company.objects.filter(
|
||||
RawSQL('num_employees > %s', (3,), output_field=models.BooleanField()),
|
||||
).count(),
|
||||
2,
|
||||
)
|
||||
|
||||
def test_filter_inter_attribute(self):
|
||||
# We can filter on attribute relationships on same model obj, e.g.
|
||||
# find companies where the number of employees is greater
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue