From a313bcf7f33244d65ca706a3e16dae9260f9f2b3 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 17 Aug 2017 16:20:47 +0200 Subject: [PATCH] [FIX] website_hr_recruitement: allow to map the list 2 times. Don't uses generator, since some code need to access after the foreach on 'jobs'. --- addons/website_hr_recruitment/controllers/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/addons/website_hr_recruitment/controllers/main.py b/addons/website_hr_recruitment/controllers/main.py index 71968b3d850..fb0909861aa 100644 --- a/addons/website_hr_recruitment/controllers/main.py +++ b/addons/website_hr_recruitment/controllers/main.py @@ -49,9 +49,9 @@ class WebsiteHrRecruitment(http.Controller): countries = set(o.country_id for o in offices if o.country_id) if department: - jobs = (j for j in jobs if j.department_id and j.department_id.id == department.id) + jobs = [j for j in jobs if j.department_id and j.department_id.id == department.id] if office_id and office_id in map(lambda x: x.id, offices): - jobs = (j for j in jobs if j.address_id and j.address_id.id == office_id) + jobs = [j for j in jobs if j.address_id and j.address_id.id == office_id] else: office_id = False