Skip to content

Move pagination logic to database level in get_assertions_by_badge #888

@Daniel-1600

Description

@Daniel-1600

The get_assertions_by_badge endpoint in assertions.py currently fetches all assertions
from the database and then slices the list in Python to achieve pagination. This is inefficient
as it loads unnecessary data into memory.

Now that tahrir-api supports limit and offset parameters in get_assertions_by_badge
(see fedora-infra/tahrir-api#265), we can pass pagination parameters directly to the database
query instead.

Depends on: fedora-infra/tahrir-api#265

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions