diff --git a/src/ibek/render_db.py b/src/ibek/render_db.py index efe0ba13b..51a1695f4 100644 --- a/src/ibek/render_db.py +++ b/src/ibek/render_db.py @@ -28,6 +28,8 @@ def add_row(self, filename: str, args: Dict[str, Any], entity: Entity) -> None: Adding a new template file if it does not already exist. Convert all arguments to strings. """ + filename = render_with_utils(dict(entity), filename) + if filename not in self.render_templates: # for new filenames create a new RenderDbTemplate entry headings = [str(i) for i in list(args.keys())] diff --git a/tests/samples/outputs/all.ioc.subst b/tests/samples/outputs/all.ioc.subst index 808a99c20..13ad05aaa 100644 --- a/tests/samples/outputs/all.ioc.subst +++ b/tests/samples/outputs/all.ioc.subst @@ -16,6 +16,13 @@ pattern { "AllObject Two", "Ref1", "1.0", "True" } } +file "jinjified1.db" { +pattern + { "name" } + { "AllObject One" } + { "AllObject Two" } +} + file "test.db" { pattern { "name", "ip", "value" } diff --git a/tests/samples/yaml/all.ibek.support.yaml b/tests/samples/yaml/all.ibek.support.yaml index 9690fc2a3..b6f5dcf27 100644 --- a/tests/samples/yaml/all.ibek.support.yaml +++ b/tests/samples/yaml/all.ibek.support.yaml @@ -115,3 +115,6 @@ defs: my_object: my_float: my_bool: + - file: jinjified{{ my_int }}.db + args: + name: