Stop software_deployments from passing empty keys

When software_deployments was given a body missing the "input_values"
field it would pass update info with input_values=None, which would
later fail and cause an internal server error.

This change prevents software_deployments from passing on NoneType
values.

Change-Id: I02e9c08bbd7429d808de1451de12cc02fc879ecb
Closes-Bug: 1319825
changes/00/110300/1
Ryan Brown 9 years ago
parent 1a2747c5e3
commit 8d139b9368

@ -85,7 +85,8 @@ class SoftwareDeploymentController(object):
"""
update_data = dict((k, body.get(k)) for k in (
'config_id', 'input_values', 'output_values', 'action',
'status', 'status_reason'))
'status', 'status_reason')
if body.get(k, None) is not None)
sd = self.rpc_client.update_software_deployment(req.context,
deployment_id,
**update_data)

Loading…
Cancel
Save