Ticket #12290 (confirmed Bug)
query [True, False] not working with BooleanIndex
Reported by: | fmoret | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | 4.x |
Component: | Backend (Python) | Version: | 4.1 |
Keywords: | Cc: |
Description
I'm trying to query catalog with : queryis_default_page? = [True, False] but it's giving me only the object with True. if I do queryis_default_page? = [False, True] it's giving me only the object with False....
I think it's coming from the new BooleanIndex (it was working some time ago).
Change History
comment:2 Changed 4 years ago by kleist
- Status changed from new to confirmed
- Version set to 4.1
- Component changed from Infrastructure to General
comment:3 Changed 4 years ago by kleist
- Component changed from General to Backend (Python)
- Milestone set to 4.x
comment:4 Changed 3 years ago by maartenkling
repeatable in 4.2 coredev
pc = context.portal_catalog query = {'is_default_page': [True, False]} print [x.id for x in pc(query)] query = {'is_default_page': [False, True]} print [x.id for x in pc(query)] return printed
returns
['topic-1', 'front-page', 'aggregator', 'aggregator'] ['folder-1', 'page-1', 'news', 'events', 'Members']
comment:5 Changed 3 years ago by maartenkling
ps, what is the usecase you need both true and false? :)
comment:6 Changed 2 years ago by fmoret
plone.app.multilingual.browser.vocabularies.py is using queryis_default_page? = (True,False) and it's not working because of that problem.
Note: See
TracTickets for help on using
tickets.
Please always specify which Plone version the ticket is about.