not supporting future.builtins anymore in templatetags

This commit is contained in:
Qwann 2017-02-05 22:39:20 +01:00
parent bc14205d29
commit 44202811ae

View file

@ -40,6 +40,5 @@ def highlight_clipper(clipper, q):
@register.filter()
def ukf(balance, is_cof):
grant = 1 + float(Settings.SUBVENTION_COF()) / 100 if is_cof else 1.
# float nécessaire car sinon problème avec le round de future.builtins
return floor(float(balance) * 10 * grant)
grant = is_cof and (1 + Settings.SUBVENTION_COF() / 100) or 1
return floor(balance * 10 * grant)