Closed fraser-langton closed 1 week ago
Hi @fraser-langton,
Thanks for such a well-described issue!
Hi @fraser-langton,
New version 0.12.32
has been released, this issue should be fixed now.
Hi @fraser-langton,
Can I close the issue? Is everything okay on your side?
@uriyyo yep thanks!
When using a CompoundSelect (from a union) in fastapi_pagination.ext.sqlalchemy._should_unwrap_scalars returns True as query.column_descriptions raises AttributeError
This was a particularly nasty bug for me to troubleshoot because the shape of the data was different I thought I had written the query wrong, the model wrong, or something else.
As an immediate fix I would perhaps suggest checking query is of type Selectable then at least it would fail explicitly instead of defaulting to some behaviour that isn't clear? To at least stop someone else in future being as confused as me.