More float fixes in service

This commit is contained in:
DarkPhoenix
2011-06-13 21:18:28 +04:00
parent 29bb52398e
commit 5e2e504b26
2 changed files with 8 additions and 7 deletions

View File

@@ -28,6 +28,10 @@ class Attribute():
return cls.instance
def getAttributeInfo(self, attributeName):
info = eos.db.getAttributeInfo(attributeName, eager=("icon", "unit"))
def getAttributeInfo(self, identity):
if isinstance(identity, (int, basestring)):
info = eos.db.getAttributeInfo(identity, eager=("icon", "unit"))
elif isinstance(identity, (int, float)):
id = int(identity)
info = eos.db.getAttributeInfo(id, eager=("icon", "unit"))
return info