plone.jsonapi error?

Jose Dinuncio <[email protected]>
Newsgroups gmane.comp.web.zope.plone.user
Message-ID <CAH5BenZxUPoigHByU1fDgmfyaohVn-3xWptAoY27Ru=1q95OZw@mail.gmail.com>
Hello,

I'm testing plone.jsonapi in Plone 4.2.7, and when I try
/@@API/plone/api/1.0/folders
<http://bor.uc.edu.ve:8080/VNC/@@API/plone/api/1.0/folders>
I got an error instead of the listing:

    line 328, in get_batch
    "pagesize": batch.pagesize, AttributeError: pagesize"

In plone/jsonapi/routes/api.py:

    def get_batch(sequence, size, start=0, endpoint=None, complete=False):
        """ create a batched result record out of a sequence (catalog
brains)
        """

        batch = Batch(sequence, size, start)
        return {
            "pagesize": batch.pagesize,
            "next":     make_next_url(batch),
            "previous": make_prev_url(batch),
            "page":     batch.pagenumber,
            "pages":    batch.numpages,
            "count":    batch.sequence_length,
            "items":    make_items_for([b for b in batch], endpoint,
complete=complete),
        }

But, batch doesn't has pagesize, but size, or has_next or has_previous,
like make_next_url and make_previous_url require. batch has type
Products.CMFPlone.PloneBatch.Batch. Products.CMFPlone-4.2.7's Batch
inherits from ZTUtils.Batch who doesn't have these methods orattributes.

Is sometime wrong on my instance or is it onplone.jsonapi?



-- 
Jose Dinuncio

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet

_______________________________________________
Plone-Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/plone-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.