mirror of
https://github.com/ChristianLight/tutor.git
synced 2024-11-10 23:30:59 +00:00
parent
39d3eaf801
commit
8eccaa61e9
@ -0,0 +1 @@
|
||||
- [Bugfix] Render config settings that are inside lists. (by @regisb)
|
@ -64,6 +64,7 @@ class EnvTests(PluginsTestCase):
|
||||
}
|
||||
self.assertEqual("ab", env.render_unknown(config, "{{ var1 }}b"))
|
||||
self.assertEqual({"x": "ac"}, env.render_unknown(config, {"x": "{{ var1 }}c"}))
|
||||
self.assertEqual(["x", "ac"], env.render_unknown(config, ["x", "{{ var1 }}c"]))
|
||||
|
||||
def test_common_domain(self) -> None:
|
||||
self.assertEqual(
|
||||
|
@ -376,6 +376,8 @@ def render_unknown(config: Config, value: t.Any) -> t.Any:
|
||||
return render_str(config, value)
|
||||
if isinstance(value, dict):
|
||||
return {k: render_unknown(config, v) for k, v in value.items()}
|
||||
if isinstance(value, list):
|
||||
return [render_unknown(config, v) for v in value]
|
||||
return value
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user