Ticket #8076: 8076_get_prevnext_by_foo.diff

File 8076_get_prevnext_by_foo.diff, 582 bytes (added by Bjorn Kristinsson, 16 years ago)

Save, with '.diff' extension for proper highlighting...

  • django/db/models/fields/related.py

     
    147147        if hasattr(value, 'as_sql'):
    148148            sql, params = value.as_sql()
    149149            return QueryWrapper(('(%s)' % sql), params)
    150         if lookup_type == 'exact':
     150        if lookup_type in ['exact', 'gt', 'lt']:
    151151            return [pk_trace(value)]
    152152        if lookup_type == 'in':
    153153            return [pk_trace(v) for v in value]
Back to Top