Cast to int the comment tree version chosen by weighted lottery.

This commit is contained in:
Logan Hanks
2012-10-29 15:04:52 -07:00
parent 3bc7b620f0
commit c1fcca8569

View File

@@ -129,7 +129,7 @@ class Link(Thing, Printable):
except KeyError:
return cls._defaults['comment_tree_version']
try:
return utils.weighted_lottery(weights)
return int(utils.weighted_lottery(weights))
except ValueError, ex:
g.log.error("error choosing comment tree version: %s", ex.message)
return cls._defaults['comment_tree_version']