Closed cekk closed 7 months ago
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % | ||
---|---|---|---|---|---|
src/redturtle/volto/restapi/services/querystringsearch/get.py | 16 | 20 | 80.0% | ||
<!-- | Total: | 16 | 20 | 80.0% | --> |
Totals | |
---|---|
Change from base Build 8231419485: | 0.3% |
Covered Lines: | 881 |
Relevant Lines: | 1371 |
This patch prevents an error with objectbrowser when you have a criteria that points to a not existing UID (or no more existing). For example a listing block with a "absolutePath" criteria that points to a deleted folder.
Plone by default, in querystring, perform a catalog search through all site (/Plone) if given UID is not valid. This is bad in objectbrowser because it made a @querystring-search call with b_size=1 to get the referenced object. The original call, get all the site contents and returns the first one..that is not the item that we want to save inside the block.
This patch do not do any catalog search if absolutePath is invalid, and return a 400.