diff options
| author | John Tran <jtran@attinteractive.com> | 2011-07-26 23:03:16 -0700 |
|---|---|---|
| committer | John Tran <jtran@attinteractive.com> | 2011-07-26 23:03:16 -0700 |
| commit | 6b33d0dfbfea7ee66a47947973133573070303cd (patch) | |
| tree | 0b2c17977e68d1f01fd1418b8c8c9bf01fb29534 /nova/api | |
| parent | 4a52d4984e9349115f37d34e47e4d1141a8cf6fc (diff) | |
code was checking for key in sqlalchemy instance but if floating_ip is a non-sqlalchemy dict instance instead, value=None will cause NoneType exception.
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/contrib/floating_ips.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/api/openstack/contrib/floating_ips.py b/nova/api/openstack/contrib/floating_ips.py index b4a211857..a02f34b8c 100644 --- a/nova/api/openstack/contrib/floating_ips.py +++ b/nova/api/openstack/contrib/floating_ips.py @@ -27,7 +27,7 @@ from nova.api.openstack import extensions def _translate_floating_ip_view(floating_ip): result = {'id': floating_ip['id'], 'ip': floating_ip['address']} - if 'fixed_ip' in floating_ip: + if 'fixed_ip' in floating_ip and floating_ip['fixed_ip']: result['fixed_ip'] = floating_ip['fixed_ip']['address'] else: result['fixed_ip'] = None |
