diff options
Diffstat (limited to 'django/db/models/sql/query.py')
| -rw-r--r-- | django/db/models/sql/query.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index e0593ef0a7..5f24e488cb 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -994,9 +994,9 @@ class Query(object): raise FieldError("Cannot compute %s('%s'): '%s' is an aggregate" % ( aggregate.name, field_name, field_name)) elif ((len(field_list) > 1) or - (field_list[0] not in [i.name for i in opts.fields]) or - self.group_by is None or - not is_summary): + (field_list[0] not in [i.name for i in opts.fields]) or + self.group_by is None or + not is_summary): # If: # - the field descriptor has more than one part (foo__bar), or # - the field descriptor is referencing an m2m/m2o field, or @@ -1906,7 +1906,7 @@ class Query(object): # is_nullable() is needed to the compiler stage, but that is not easy # to do currently. if ((connections[DEFAULT_DB_ALIAS].features.interprets_empty_strings_as_nulls) - and field.empty_strings_allowed): + and field.empty_strings_allowed): return True else: return field.null |
