Skip to content

Commit

Permalink
Fixing an issue where a unique id was not being returned for the over…
Browse files Browse the repository at this point in the history
…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
John Postlethwait committed Mar 22, 2012
1 parent 67f3663 commit a80da1a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions horizon/tables/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion horizon/usage/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a80da1a

Please sign in to comment.