Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Replaced '__' with LOOKUP_SEP in sql/query.py

Thanks to Simon Charette for report.
  • Loading branch information...
commit c64b57d16688025b2d48668d5c4cb9eda7484612 1 parent bbabfdc
Anssi Kääriäinen authored December 17, 2012

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/db/models/sql/query.py
2  django/db/models/sql/query.py
@@ -1545,7 +1545,7 @@ def split_exclude(self, filter_expr, prefix, can_reuse):
1545 1545
         alias, col = query.select[0].col
1546 1546
         query.where.add((Constraint(alias, col, None), 'isnull', False), AND)
1547 1547
         # We need to trim the last part from the prefix.
1548  
-        trimmed_prefix = '__'.join(prefix.split(LOOKUP_SEP)[0:-1])
  1548
+        trimmed_prefix = LOOKUP_SEP.join(prefix.split(LOOKUP_SEP)[0:-1])
1549 1549
         if not trimmed_prefix:
1550 1550
             rel, _, direct, m2m = self.model._meta.get_field_by_name(prefix)
1551 1551
             if not m2m:

0 notes on commit c64b57d

Please sign in to comment.
Something went wrong with that request. Please try again.