From 44202811ae09e118482db18092b435504ef8dac4 Mon Sep 17 00:00:00 2001 From: Qwann Date: Sun, 5 Feb 2017 22:39:20 +0100 Subject: [PATCH] not supporting future.builtins anymore in templatetags --- kfet/templatetags/kfet_tags.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/kfet/templatetags/kfet_tags.py b/kfet/templatetags/kfet_tags.py index 2dd704b6..3b1bb639 100644 --- a/kfet/templatetags/kfet_tags.py +++ b/kfet/templatetags/kfet_tags.py @@ -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)