mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
simplify split
This commit is contained in:
parent
640c24d9b7
commit
c08d0baa88
1 changed files with 2 additions and 3 deletions
|
|
@ -87,9 +87,8 @@ def get_folder_template_data(folder_entity, project_name):
|
|||
"""
|
||||
|
||||
path = folder_entity["path"]
|
||||
parents = path.split("/")
|
||||
# Remove empty string from the beginning
|
||||
parents.pop(0)
|
||||
# Remove empty string from the beginning and split by '/'
|
||||
parents = path.lstrip("/").split("/")
|
||||
# Remove last part which is folder name
|
||||
folder_name = parents.pop(-1)
|
||||
hierarchy = "/".join(parents)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue