litestar-org/litestar-fullstack

Bug: default behaviour change in CollectionFilter breaks id filter

Closed this issue · 1 comments

Description

the change of the default behaviour of CollectionFilter in litestar-org/advanced-alchemy#51 breaks the current implementation of provide_id_filter

def provide_id_filter(

Currently, there is an empty list if no id's are provided in the field_name id.
By default, I don't want the ID filter to apply and get all results.

Would it be needed to check if a query value for "ids" is provided and only then returning a CollectionFilter instance?

URL to code causing the issue

No response

MCVE

# Your MCVE code here

Steps to reproduce

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

Screenshots

"In the format of: ![SCREENSHOT_DESCRIPTION](SCREENSHOT_LINK.png)"

Logs

No response

Litestar Version

litestar==2.2.1
advanced-alchemy==0.3.2

Platform

  • Linux
  • Mac
  • Windows
  • Other (Please specify in the description above)
cofin commented

I've got a fix I'll push for this shortly.