yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #63054
[Bug 1675912] Re: DataTable complains a field doesn't exist even when the field exists if its value is None
Reviewed: https://review.openstack.org/449805
Committed: https://git.openstack.org/cgit/openstack/horizon/commit/?id=5dadf41c5da56de4d31fa2f2609cf6f6f0b5efb7
Submitter: Jenkins
Branch: master
commit 5dadf41c5da56de4d31fa2f2609cf6f6f0b5efb7
Author: Akihiro Motoki <amotoki@xxxxxxxxx>
Date: Fri Mar 24 20:09:32 2017 +0000
Fix the existence check in DataTable Column
Previously DataTable Column checks whether a field exists or not
by checking a result of dict.get(). This has a side effect that
the check complains a field does not exist even when the field
value is None. This commit change the logic to use hasattr to
handle a field with None.
Change-Id: I6ef5ccf90aefd3c407f91a5f3a633d8f68593339
Closes-Bug: #1675912
** Changed in: horizon
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Dashboard (Horizon).
https://bugs.launchpad.net/bugs/1675912
Title:
DataTable complains a field doesn't exist even when the field exists
if its value is None
Status in OpenStack Dashboard (Horizon):
Fix Released
Bug description:
For example, when I displayed the instance table, I got the following error message.
OS-EXT-STS:task_state actually exists but its value is None.
The attribute OS-EXT-STS:task_state doesn't exist on <Server: {'OS-
EXT-STS:power_state': 4, 'image_name':
<django.utils.functional.__proxy__ object at 0x7f5baa231c10>, 'OS-EXT-
SRV-ATTR:host': u'sheep6', 'OS-EXT-SRV-ATTR:instance_name':
u'instance-00000001', 'links': [{u'href':
u'http://172.27.201.206:8774/v2.1/3b91ad8c9c624303aa38334f8fc5349e/servers
/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59', u'rel': u'self'}, {u'href':
u'http://172.27.201.206:8774/3b91ad8c9c624303aa38334f8fc5349e/servers
/2820fcfc-3cd2-4a40-8c01-3c9544cfbc59', u'rel': u'bookmark'}], 'OS-
EXT-STS:task_state': None, 'addresses': {u'private': [{u'addr':
u'10.0.0.11', u'OS-EXT-IPS-MAC:mac_addr': u'fa:16:3e:d9:41:65', u'OS-
EXT-IPS:type': u'fixed', u'version': 4}, {u'addr':
u'fd5e:b22b:a263:0:f816:3eff:fed9:4165', u'OS-EXT-IPS-MAC:mac_addr':
u'fa:16:3e:d9:41:65', u'OS-EXT-IPS:type': u'fixed', u'version': 6}]},
'OS-DCF:diskConfig': u'AUTO', 'OS-EXT-AZ:availability_zone': u'nova',
'created': u'2017-03-22T22:50:35Z', 'name': u'vm1', 'user_id':
u'07c9103fb1fa4a518036b9dd68838c70', 'status': u'SUSPENDED', 'id': u
'2820fcfc-3cd2-4a40-8c01-3c9544cfbc59', 'flavor': {u'links':
[{u'href':
u'http://172.27.201.206:8774/3b91ad8c9c624303aa38334f8fc5349e/flavors/1',
u'rel': u'bookmark'}], u'id': u'1'}, 'key_name': None, 'metadata': {},
'image': u'', 'tenant_id': u'3b91ad8c9c624303aa38334f8fc5349e'}>.
To manage notifications about this bug go to:
https://bugs.launchpad.net/horizon/+bug/1675912/+subscriptions
References