From 8f2bbf73ae5943a0cd35de3f3f48482575f4fe2c Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Wed, 14 May 2014 16:15:18 +0200 Subject: [PATCH] [FIX] gamification: avoid sending reports for non-reported challenges --- addons/gamification/models/challenge.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/gamification/models/challenge.py b/addons/gamification/models/challenge.py index 9612cf4a05e..ed6016b9665 100644 --- a/addons/gamification/models/challenge.py +++ b/addons/gamification/models/challenge.py @@ -324,7 +324,7 @@ class gamification_challenge(osv.Model): ('end_date', '<=', challenge.last_report_date) ]) - if fields.date.today() >= challenge.next_report_date: + if challenge.next_report_date and fields.date.today() >= challenge.next_report_date: self.report_progress(cr, uid, challenge, context=context) elif len(closed_goals_to_report) > 0: