diff --git a/addons/subscription/subscription.py b/addons/subscription/subscription.py index 9a5781d2ddd7f8c10888bdd612bae7cf7f83fa32..d06d601840d9fab55a4849f7c8ea8e55177448e5 100644 --- a/addons/subscription/subscription.py +++ b/addons/subscription/subscription.py @@ -130,8 +130,9 @@ class subscription_subscription(osv.osv): def set_done(self, cr, uid, ids, context=None): res = self.read(cr,uid, ids, ['cron_id']) - ids2 = [x['cron_id'][0] for x in res if x['id']] - self.pool.get('ir.cron').write(cr, uid, ids2, {'active':False}) + ids2 = [x['cron_id'][0] for x in res if x['cron_id']] + if ids2: + self.pool.get('ir.cron').write(cr, uid, ids2, {'active':False}) self.write(cr, uid, ids, {'state':'done'}) return True