id summary reporter owner description type status component version severity resolution keywords cc stage has_patch needs_docs needs_tests needs_better_patch easy ui_ux 2595 get_next_by_FIELD returns itself if it is the last item, under postgres matt@… Adrian Holovaty "Sometime in the last few days get_next_by_FIELD seems to have broken under Postgresql. Calling {{{get_next_by_published}}}, where {{{published}}} is a {{{DateTimeField(auto_now_add=True)}}}, on the latest item returns that same item again. e.g. {{{ >>> x = Post.objects.all() >>> x ... [, , ] >>> x[0] ... >>> x[0].get_next_by_published() ... }}} Works fine under MySQL (passes all tests, and I don't see the problem). Unfortunately I don't have enough postgres access to run the tests there." defect closed Database layer (models, ORM) normal worksforme Unreviewed 0 0 0 0 0 0