Ticket #2445: query_value.diff

File query_value.diff, 578 bytes (added by michael@…, 9 years ago)

test callable(value) in db/models/query.py

  • trunk/django/db/models/query.py

     
    731731            if len(path) < 1:
    732732                raise TypeError, "Cannot parse keyword query %r" % kwarg
    733733
     734            if callable(value):
     735                value = value()
     736
    734737            joins2, where2, params2 = lookup_inner(path, lookup_type, value, opts, opts.db_table, None)
    735738            joins.update(joins2)
    736739            where.extend(where2)
Back to Top