fix: Revert naming for custom naming series
This commit is contained in:
parent
59e9a2520b
commit
483cd85eba
1 changed files with 6 additions and 1 deletions
|
|
@ -202,7 +202,12 @@ def revert_series_if_last(key, name, doc=None):
|
|||
if ".#" in key:
|
||||
prefix, hashes = key.rsplit(".", 1)
|
||||
if "#" not in hashes:
|
||||
return
|
||||
key = key.rsplit(".")
|
||||
hash = list(filter(re.compile(".*#").match, key))[0]
|
||||
if not hash:
|
||||
return
|
||||
name = name.replace(hashes, "")
|
||||
prefix, hashes = key[:key.index(hash)+1]
|
||||
else:
|
||||
prefix = key
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue