collective / Products.PloneKeywordManager

Change, merge and delete keywords (AKA tags or subjects) in Plone.
https://pypi.org/project/Products.PloneKeywordManager/
4 stars 8 forks source link

"Empty" keyword is not showing up. #45

Closed flipmcf closed 2 years ago

flipmcf commented 2 years ago

We have the empty string in our Subject field:
This guy: ''

>>> from Products.CMFCore.utils import getToolByName
>>> catalog = getToolByName(app.Plone, "portal_catalog")
>>> idx = catalog._catalog.getIndex('Subject')
>>> [x for x in idx.uniqueValues()][:3]
['', ' ', '  ']
>>> val = idx._index['']
>>> len(val)
121978

It doesn't show up on the tool, but we want to delete it.

Make the empty string show up in the tool.