Browse files

Fixing an issue where a unique id was not being returned for the over…

…view table, causing the same information to be rendered for instances with the same name but differing stats. Fixes bug #959489

Change-Id: I78050462903e1b971d0a219805d19c5f728e23f7
  • Loading branch information...
1 parent 67f3663 commit a80da1a2de709fd342a0ea46281a1598c35e083a @JohnPostlethwait JohnPostlethwait committed Mar 22, 2012
Showing with 6 additions and 1 deletion.
  1. +5 −0 horizon/tables/base.py
  2. +1 −1 horizon/usage/tables.py
View
5 horizon/tables/base.py
@@ -954,6 +954,11 @@ def get_object_id(self, datum):
By default this returns an ``id`` attribute on the given object,
but this can be overridden to return other values.
+
+ .. warning::
+
+ Make sure that the value returned is a unique value for the id
+ otherwise rendering issues can occur.
"""
return datum.id
View
2 horizon/usage/tables.py
@@ -49,7 +49,7 @@ class TenantUsageTable(BaseUsageTable):
filters=(timesince,))
def get_object_id(self, datum):
- return datum['name']
+ return id(datum)
class Meta:
name = "tenant_usage"

0 comments on commit a80da1a

Please sign in to comment.