diff options
| author | Anssi Kääriäinen <akaariai@gmail.com> | 2014-01-18 21:17:12 +0200 |
|---|---|---|
| committer | Anssi Kääriäinen <akaariai@gmail.com> | 2014-01-18 21:18:50 +0200 |
| commit | f468662e2495292356e5fd75241621563893fd4f (patch) | |
| tree | d4475a2d39cbc25335ee6c6cb3e6fc5ee28e5ca1 | |
| parent | 2f65b8e14c03a6b43c11d5de791b8d4d91721777 (diff) | |
Fixed #21821 -- db_type argument for field_cast_sql
The db_type argument for connection.ops.field_cast_sql wasn't correctly
set after merge of custom lookups patch.
| -rw-r--r-- | django/db/models/lookups.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/lookups.py b/django/db/models/lookups.py index 5369994bbc..2b9a2e722c 100644 --- a/django/db/models/lookups.py +++ b/django/db/models/lookups.py @@ -116,7 +116,7 @@ class BuiltinLookup(Lookup): def as_sql(self, qn, connection): lhs_sql, params = self.process_lhs(qn, connection) field_internal_type = self.lhs.output_type.get_internal_type() - db_type = self.lhs.output_type + db_type = self.lhs.output_type.db_type(connection=connection) lhs_sql = connection.ops.field_cast_sql(db_type, field_internal_type) % lhs_sql lhs_sql = connection.ops.lookup_cast(self.lookup_name) % lhs_sql rhs_sql, rhs_params = self.process_rhs(qn, connection) |
