Closed IterableTrucks closed 5 days ago
Attention: Patch coverage is 66.66667%
with 1 line
in your changes missing coverage. Please review.
Project coverage is 92.69%. Comparing base (
245519c
) to head (b76c621
). Report is 282 commits behind head on main.
Files | Patch % | Lines |
---|---|---|
fastapi_pagination/ext/beanie.py | 66.66% | 1 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@IterableTrucks Could you please fix lint errors?
Beanie's find_many method will modify the limit and offset number of the query. When querying with fetch_links=False as default, this will not be a problem, but when fetch_links=True the implicitly created aggregation pipeline will add limit and skip stages which is incorrect to count the total number. To fix this problem, count query should be placed before items query and the fetch_links should respect the parameter's value in paginate method.