There's a bug in Christoph Haas's alternative paginator
(http://workaround.org/pylons/paginator/)
if the result set contains zero records and 'show_if_single_page' is true.

Module inews.lib.paginator:245 in navigator
text = '%s' % (self.first_page+(start_with_one and 1))
TypeError: unsupported operand type(s) for +: 'NoneType' and 'int'

self.first_page was set to None in line 121.

I think the solution is to add a stanza after this one:

        # Don't show navigator if there is no more than one page
        if self.page_count <= 1 and show_if_single_page == False:
            return ''

adding at line 237:

        # If zero result records, return a fake navigator
        return '<strong>[1]</strong>'

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to