[predicates] fix paginated_rset when the class has no page_size_property
Fixes test failure introduced by 70733b2dfd2a, which assumed paginated_rset
would only be called on a class with a page_size_property attribute.
--- a/predicates.py Wed Feb 03 14:23:17 2016 +0100
+++ b/predicates.py Wed Feb 03 16:23:34 2016 +0100
@@ -498,7 +498,8 @@
except ValueError:
page_size = None
if page_size is None:
- page_size = req.property_value(cls.page_size_property)
+ page_size_prop = getattr(cls, 'page_size_property', 'navigation.page-size')
+ page_size = req.property_value(page_size_prop)
if len(rset) <= (page_size*self.nbpages):
return 0
return self.nbpages