Skip to content
Snippets Groups Projects
Commit 4f913745 authored by Samuel GAIST's avatar Samuel GAIST
Browse files

[search][utils] Strip database_name from split chars

If the database name ends with a dot, the split method will return
a list with one empty char entry which means that in the case of
the dataset name generation we might end up with an empty string
and trigger an invalid index error. This patch avoids this by
ignoring leading and trailing split chars.
parent fe7999e7
No related branches found
No related tags found
1 merge request!268Strip database_name from split chars
Pipeline #25676 passed
......@@ -198,7 +198,7 @@ class FilterGenerator(object):
# beginning and/or end of the relevant dataset name parts.
#---------------------------------------------------------------------------
def parse_dataset_name(self, dataset_name, exact=False):
parts = re.split(r'[\.@]', dataset_name)
parts = re.split(r'[\.@]', dataset_name.strip(".@"))
database = None
version = None
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment