Permalink
Browse files

fix: make objective_coefficient a float

So JSON serialisation doesn’t fail
  • Loading branch information...
KristianJensen
KristianJensen committed Apr 4, 2016
1 parent 739ea69 commit 8b72529fd720c9921891d6f06cf1dd6f55bdd134
Showing with 1 addition and 1 deletion.
  1. +1 −1 cameo/core/reaction.py
View
@@ -271,7 +271,7 @@ def objective_coefficient(self):
forw_coef = coefficients_dict.get(self.forward_variable, 0)
rev_coef = coefficients_dict.get(self.reverse_variable, 0)
if forw_coef == -rev_coef:
self._objective_coefficient = forw_coef
self._objective_coefficient = float(forw_coef)
else:
self._objective_coefficient = 0
return self._objective_coefficient

0 comments on commit 8b72529

Please sign in to comment.