mirror of
https://github.com/django/django.git
synced 2025-10-29 08:36:09 +00:00
Backwards-incompatible change -- Removed LazyDate helper class. To preserve existing functionality, query arguments can now be callable. Callable query arguments are evaluated with the query is evaluated.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -826,7 +826,9 @@ def parse_lookup(kwarg_items, opts):
|
||||
# Interpret '__exact=None' as the sql '= NULL'; otherwise, reject
|
||||
# all uses of None as a query value.
|
||||
if lookup_type != 'exact':
|
||||
raise ValueError, "Cannot use None as a query value"
|
||||
raise ValueError, "Cannot use None as a query value"
|
||||
elif callable(value):
|
||||
value = value()
|
||||
|
||||
joins2, where2, params2 = lookup_inner(path, lookup_type, value, opts, opts.db_table, None)
|
||||
joins.update(joins2)
|
||||
|
||||
Reference in New Issue
Block a user