Warn when transforming constructed groups (#60912)
* Warn when transforming constructed groups
The `keyed_groups` field has used sanitization since 2.6, but `groups` only started doing so in 2.8.
This adds a warning for the change in behavior.
* changelog
(cherry picked from commit 3247626ac7
)
This commit is contained in:
parent
0bc1285987
commit
b77abd0491
2 changed files with 3 additions and 1 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- constructed - Add a warning for the change in behavior in the sanitization of the groups option.
|
|
@ -372,7 +372,7 @@ class Constructable(object):
|
||||||
self.templar.set_available_variables(variables)
|
self.templar.set_available_variables(variables)
|
||||||
for group_name in groups:
|
for group_name in groups:
|
||||||
conditional = "{%% if %s %%} True {%% else %%} False {%% endif %%}" % groups[group_name]
|
conditional = "{%% if %s %%} True {%% else %%} False {%% endif %%}" % groups[group_name]
|
||||||
group_name = self._sanitize_group_name(group_name)
|
group_name = original_safe(group_name, force=True)
|
||||||
try:
|
try:
|
||||||
result = boolean(self.templar.template(conditional))
|
result = boolean(self.templar.template(conditional))
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
|
Loading…
Reference in a new issue