diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index ad932dddc31..868e46d1fdf 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -377,11 +377,11 @@ class Challenge(models.Model): if end_date: values['end_date'] = end_date - # the goal is initialised over the limit to make sure we will compute it at least once - if line.condition == 'higher': - values['current'] = min(line.target_goal - 1, 0) - else: - values['current'] = max(line.target_goal + 1, 0) + # the goal is initialised over the limit to make sure we will compute it at least once + if line.condition == 'higher': + values['current'] = min(line.target_goal - 1, 0) + else: + values['current'] = max(line.target_goal + 1, 0) if challenge.remind_update_delay: values['remind_update_delay'] = challenge.remind_update_delay