igorbenav / fastcrud

FastCRUD is a Python package for FastAPI, offering robust async CRUD operations and flexible endpoint creation utilities.
MIT License
643 stars 45 forks source link

Select method changes and docs #32

Closed igorbenav closed 6 months ago

igorbenav commented 6 months ago

Pull Request Template for FastCRUD

Description

This is essentially a bug fix + docs for #28 by @dubusster

Changes

Tests

Detailed Bug Fix

In select, checking whether sort_columns are provided were written as follows:

if "sort_columns":
           stmt = self._apply_sorting(stmt, sort_columns, sort_orders)

Which was fixed to:

if sort_columns:
           stmt = self._apply_sorting(stmt, sort_columns, sort_orders)
igorbenav commented 6 months ago

Hey, @dubusster, do you want to take a look?

dubusster commented 6 months ago

Oups, thanks for the fix and the additional tests @igorbenav!

dubusster commented 6 months ago

I'll have a look tomorrow to maybe add some more detailed tests