Ticket #11283: latest-clear-ordering.patch
File latest-clear-ordering.patch, 473 bytes (added by , 15 years ago) |
---|
-
django/db/models/query.py
353 353 "Cannot change a query once a slice has been taken." 354 354 obj = self._clone() 355 355 obj.query.set_limits(high=1) 356 obj.query.clear_ordering() 356 357 obj.query.add_ordering('-%s' % latest_by) 357 358 return obj.get() 358 359