﻿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
2878	Paginator last_on_page fails when .hits hasn't been called	sago	Adrian Holovaty	"Because the last_on_page method relies on self._hits, it crashes when self._hits hasn't been set up yet. 

This probably hasn't been seen before because most people call paginator.hits (which sets the ._hits attribute) before calling last_on_page.

All that's needed is to make sure ._hits is valid before proceeding. Calls to ._hits could be
exchanged for calls to .hits, but that would involve multiple calls to the property (and therefore the checking logic) in one go. Better, IMHO, to call self.hits once, then use the value throughout the method.

Patch shows this.

"	defect	closed	Core (Other)	dev	normal	fixed	paginator		Unreviewed	0	0	0	0	0	0
