diff --git a/service/attribute.py b/service/attribute.py index 6e183d24d..b6a9ea500 100644 --- a/service/attribute.py +++ b/service/attribute.py @@ -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 diff --git a/service/market.py b/service/market.py index 8ddefd547..674a0b1e5 100644 --- a/service/market.py +++ b/service/market.py @@ -323,11 +323,8 @@ class Market(): if isinstance(identity, eos.types.Group): return identity elif isinstance(identity, (int, float, basestring)): - # Attempt to convert float to int - try: - id = int(identity) - except ValueError: - id = None + if isinstance(identity, float): + identity = int(identity) # Check custom groups for cgrp in self.customGroups: # During first comparison we need exact int, not float for matching