Don't re-inject become* variables as it causes problems when templating is involved

Prior to 75b6f61, we strictly limited variables we re-injected. After that
patch however, we re-injected everything which causes problems under certain
circumstances. For now, we'll continue to filter out some properties of
PlayContext for re-injection.

Fixes #14352
pull/14618/head
James Cammarata 8 years ago
parent 283532e11d
commit 078ebb0dec

@ -513,8 +513,14 @@ class PlayContext(Base):
'''
for prop, var_list in MAGIC_VARIABLE_MAPPING.items():
var_val = getattr(self, prop, None)
if var_val is not None:
try:
if 'become' in prop:
continue
var_val = getattr(self, prop)
for var_opt in var_list:
if var_opt not in variables:
variables[var_opt] = var_val
except AttributeError:
continue

Loading…
Cancel
Save