plone / guillotina

Python AsyncIO data API to manage billions of resources
https://guillotina.readthedocs.io/en/latest/
Other
187 stars 50 forks source link

adding slash in path__starts queries when context is not the container #1179

Closed nilbacardit26 closed 1 year ago

nilbacardit26 commented 1 year ago

I found bug when searching with pg catalog on contexts that starts with the same path than others:

/db/container/foo_folder/Item1
/db/container/foo_folder2/Item2

/db/container/foo_folder/@search

it returned Item1 and Item2

codecov-commenter commented 1 year ago

Codecov Report

Merging #1179 (d7756f7) into master (cf3c992) will increase coverage by 0.1%. The diff coverage is 100.0%.

Additional details and impacted files [![Impacted file tree graph](https://codecov.io/gh/plone/guillotina/pull/1179/graphs/tree.svg?width=650&height=150&src=pr&token=MIUJDWnGXD&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plone)](https://codecov.io/gh/plone/guillotina/pull/1179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plone) ```diff @@ Coverage Diff @@ ## master #1179 +/- ## ======================================== + Coverage 94.7% 94.7% +0.1% ======================================== Files 358 358 Lines 30675 30700 +25 ======================================== + Hits 29044 29069 +25 Misses 1631 1631 ``` | [Impacted Files](https://codecov.io/gh/plone/guillotina/pull/1179?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plone) | Coverage Δ | | |---|---|---| | [guillotina/catalog/parser.py](https://codecov.io/gh/plone/guillotina/pull/1179/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plone#diff-Z3VpbGxvdGluYS9jYXRhbG9nL3BhcnNlci5weQ==) | `90.4% <100.0%> (+0.3%)` | :arrow_up: | | [guillotina/tests/test\_catalog.py](https://codecov.io/gh/plone/guillotina/pull/1179/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=plone#diff-Z3VpbGxvdGluYS90ZXN0cy90ZXN0X2NhdGFsb2cucHk=) | `100.0% <100.0%> (ø)` | |