fix re-use of 'output' for representation

This commit is contained in:
Jakub Trllo 2023-10-16 12:24:18 +02:00
parent ed4c306c43
commit 74b7364818
2 changed files with 7 additions and 0 deletions

View file

@ -997,6 +997,8 @@ class ProjectPushItemProcess:
ext = os.path.splitext(src_file.path)[-1]
repre_format_data["ext"] = ext[1:]
break
# Re-use 'output' from source representation
repre_output_name = repre_doc["context"].get("output")
if repre_output_name is not None:
repre_format_data["output"] = repre_output_name

View file

@ -1051,6 +1051,11 @@ class ProjectPushItemProcess:
repre_format_data["ext"] = ext[1:]
break
# Re-use 'output' from source representation
repre_output_name = repre_doc["context"].get("output")
if repre_output_name is not None:
repre_format_data["output"] = repre_output_name
template_obj = anatomy.templates_obj[template_name]["folder"]
folder_path = template_obj.format_strict(formatting_data)
repre_context = folder_path.used_values