remove duplicated validation of template name

This commit is contained in:
Jakub Trllo 2025-01-07 15:37:33 +01:00
parent c6ea24edcf
commit 228a3c6f05

View file

@ -76,7 +76,6 @@ def get_staging_dir_config(
# get template from template name
template_name = profile["template_name"]
_validate_template_name(project_name, template_name, anatomy)
template = anatomy.get_template_item("staging", template_name)
@ -93,19 +92,6 @@ def get_staging_dir_config(
return {"template": template, "persistence": data_persistence}
def _validate_template_name(project_name, template_name, anatomy):
"""Check that staging dir section with appropriate template exist.
Raises:
ValueError - if misconfigured template
"""
if template_name not in anatomy.templates["staging"]:
raise ValueError(
f'Anatomy of project "{project_name}" does not have set'
f' "{template_name}" template key at Staging Dir category!'
)
def get_staging_dir_info(
project_entity,
folder_entity,