Check that env is not None before decrypting
After database migration 056, it became possible to have an environment of None. Check that env is not None before looking inside it. Change-Id: Ic498e8e630608886178df83d1e7a503525834573 Closes-Bug: #1464379
This commit is contained in:
parent
b5483ae07a
commit
b6f865fa00
|
@ -47,7 +47,8 @@ class RawTemplate(
|
||||||
tpl[field] = db_tpl[field]
|
tpl[field] = db_tpl[field]
|
||||||
|
|
||||||
# If any of the parameters were encrypted, then decrypt them
|
# If any of the parameters were encrypted, then decrypt them
|
||||||
if env_fmt.ENCRYPTED_PARAM_NAMES in tpl.environment:
|
if (tpl.environment is not None and
|
||||||
|
env_fmt.ENCRYPTED_PARAM_NAMES in tpl.environment):
|
||||||
parameters = tpl.environment[env_fmt.PARAMETERS]
|
parameters = tpl.environment[env_fmt.PARAMETERS]
|
||||||
encrypted_param_names = tpl.environment[
|
encrypted_param_names = tpl.environment[
|
||||||
env_fmt.ENCRYPTED_PARAM_NAMES]
|
env_fmt.ENCRYPTED_PARAM_NAMES]
|
||||||
|
|
Loading…
Reference in New Issue