1
0
mirror of https://github.com/django/django.git synced 2025-10-31 09:41:08 +00:00

[1.9.x] Fixed #25506 -- Allowed filtering over a RawSQL annotation.

Co-Authored-By: Gavin Wahl <gwahl@fusionbox.com>

Backport of b971c1cd78 from master
This commit is contained in:
Antoine Catton
2015-10-05 14:13:14 -06:00
committed by Tim Graham
parent 38d6e1e2ad
commit 36e7d275ec
3 changed files with 15 additions and 1 deletions

View File

@@ -151,7 +151,7 @@ class BuiltinLookup(Lookup):
lhs_sql = connection.ops.field_cast_sql(
db_type, field_internal_type) % lhs_sql
lhs_sql = connection.ops.lookup_cast(self.lookup_name, field_internal_type) % lhs_sql
return lhs_sql, params
return lhs_sql, list(params)
def as_sql(self, compiler, connection):
lhs_sql, params = self.process_lhs(compiler, connection)