Asset Pipeline v2 #145
@ -146,13 +146,11 @@ def task_layer_prefix_name_get(name: str, task_layer_owner: str) -> str:
|
|||||||
Returns:
|
Returns:
|
||||||
str: Returns name with prefix
|
str: Returns name with prefix
|
||||||
"""
|
"""
|
||||||
if name.startswith(config.TASK_LAYER_TYPES[task_layer_owner] + "."):
|
for task_layer_key in config.TASK_LAYER_TYPES:
|
||||||
|
if name.startswith(config.TASK_LAYER_TYPES[task_layer_key] + "."):
|
||||||
return name
|
return name
|
||||||
|
|
||||||
base_name = task_layer_prefix_basename_get(name)
|
|
||||||
|
|
||||||
prefix = config.TASK_LAYER_TYPES[task_layer_owner]
|
prefix = config.TASK_LAYER_TYPES[task_layer_owner]
|
||||||
return prefix + "." + base_name
|
return prefix + "." + name
|
||||||
|
|
||||||
|
|
||||||
def task_layer_prefix_basename_get(name: str) -> str:
|
def task_layer_prefix_basename_get(name: str) -> str:
|
||||||
@ -169,10 +167,9 @@ def task_layer_prefix_transfer_data_update(transfer_data_item):
|
|||||||
|
|
||||||
obj = transfer_data_item.id_data
|
obj = transfer_data_item.id_data
|
||||||
td_data = data_type_from_transfer_data_key(obj, transfer_data_item.type)
|
td_data = data_type_from_transfer_data_key(obj, transfer_data_item.type)
|
||||||
new_name = task_layer_prefix_name_get(
|
base_name = task_layer_prefix_basename_get(transfer_data_item.name)
|
||||||
transfer_data_item.name, transfer_data_item.owner
|
prefix = config.TASK_LAYER_TYPES[transfer_data_item.owner]
|
||||||
)
|
new_name = prefix + "." + base_name
|
||||||
|
|
||||||
if new_name == transfer_data_item.name or not td_data.get(transfer_data_item.name):
|
if new_name == transfer_data_item.name or not td_data.get(transfer_data_item.name):
|
||||||
return
|
return
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user