Skip to content
Snippets Groups Projects
Commit 2d83656c authored by Olivier Dony's avatar Olivier Dony
Browse files

[FIX] analytic: multi-path name_search should properly handle `limit`

Due to commit 1576bc98,
when name_search() is called on analytic accounts with
multiple path components (e.g. A/B/C), the intermediary
searches are done without the extra domain criterions,
because they should only apply to the leaf.

However because the limit was applied for each step
of the multi-path search, it was quite likely that
no valid results were found in the final filtering,
returning no result at all.

In fact the intermediary steps should not apply the
limit at all, because the leaves we're looking for
may actually be located under parents that are not
found when the limit is applied on each step.

This commits removes the limit (hopefully without
too much of an extra penalty for large databases)

It also introduces a better fallback in case the
multi-path search did not produce any result,
for example if the name of the lead really contains
a '/', and it was not meant to be a path separator.
parent b2193e67
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment