Merge pull request #1990 from jrsndl/bugfix/nuke_last_version_from_path

This commit is contained in:
Milan Kolar 2021-09-09 09:52:56 +02:00 committed by GitHub
commit fcd3df0615
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,7 +77,7 @@ def get_version_from_path(file):
"""
pattern = re.compile(r"[\._]v([0-9]+)", re.IGNORECASE)
try:
return pattern.findall(file)[0]
return pattern.findall(file)[-1]
except IndexError:
log.error(
"templates:get_version_from_workfile:"