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
Pipeline #25676 passed with stage
in 18 minutes and 26 seconds
......@@ -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
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment