Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Väčší počet objektov na stránku #14

Open
alby-m opened this issue Feb 15, 2023 · 0 comments · May be fixed by #17
Open

Väčší počet objektov na stránku #14

alby-m opened this issue Feb 15, 2023 · 0 comments · May be fixed by #17

Comments

@alby-m
Copy link

alby-m commented Feb 15, 2023

Fakturoid zmenil počet objektov, ktorý vráti v rámci response (napr. z API endpointu invoices) z 20 na 40.

Trieda PagedResource ale počíta stále s 20 objektami, preto pri paginácii vracia len prvých 20 objektov z každej stránky a zvyšok odignoruje.

Pre fix by malo by stačiť upraviť paging.py

class PagedResource(object):
    """List adapter for paged resources. Returns sliceable lazy loaded object."""

    def __init__(self, page_size=40):
        self.pages = {}
        self.page_size = page_size or 40
        self.page_count = None

Vopred ďakujem za čo najrýchlejší fix 🙏

@piit79 piit79 linked a pull request May 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant