Ticket #13640: 13640_fix_only.diff
File 13640_fix_only.diff, 981 bytes (added by , 13 years ago) |
---|
-
django/db/models/sql/query.py
14 14 from django.db import connections, DEFAULT_DB_ALIAS 15 15 from django.db.models import signals 16 16 from django.db.models.fields import FieldDoesNotExist 17 from django.db.models.expressions import ExpressionNode 17 18 from django.db.models.query_utils import select_related_descend, InvalidQuery 18 19 from django.db.models.sql import aggregates as base_aggregates_module 19 20 from django.db.models.sql.constants import * … … 1048 1049 value = True 1049 1050 elif callable(value): 1050 1051 value = value() 1051 elif hasattr(value, 'evaluate'):1052 elif isinstance(value, ExpressionNode): 1052 1053 # If value is a query expression, evaluate it 1053 1054 value = SQLEvaluator(value, self) 1054 1055 having_clause = value.contains_aggregate