diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-09-16 12:12:54 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-09-16 12:12:54 +0000 |
| commit | a2c7fe52a8e2d938621d1f7607e3d8a7a84ebf1e (patch) | |
| tree | 209ec8386698c4efe59c2c536afce76a25a63262 /django/db/models/sql | |
| parent | 6febb7ef1584b73d24b079463057740c98cddfb3 (diff) | |
[1.1.X] Fixed #11886 -- Corrected handling of F() expressions that use parentheses. Thanks to Brent Hagany for the report.
Merge of r11581 from trunk.
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.1.X@11582 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/sql')
| -rw-r--r-- | django/db/models/sql/expressions.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/sql/expressions.py b/django/db/models/sql/expressions.py index 920cbffe73..0914c2b3c1 100644 --- a/django/db/models/sql/expressions.py +++ b/django/db/models/sql/expressions.py @@ -66,7 +66,7 @@ class SQLEvaluator(object): else: sql, params = '%s', (child,) - if hasattr(child, 'children') > 1: + if len(getattr(child, 'children', [])) > 1: format = '(%s)' else: format = '%s' |
