Ticket #11283: latest-clear-ordering.patch

File latest-clear-ordering.patch, 473 bytes (added by benmoran, 15 years ago)
  • django/db/models/query.py

     
    353353                "Cannot change a query once a slice has been taken."
    354354        obj = self._clone()
    355355        obj.query.set_limits(high=1)
     356        obj.query.clear_ordering()       
    356357        obj.query.add_ordering('-%s' % latest_by)
    357358        return obj.get()
    358359
Back to Top