More float fixes in service
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user