[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'.
This commit is contained in:
Jeremy Kersten
2017-08-17 21:40:33 +02:00
parent 6d43322f1a
commit a313bcf7f3
@@ -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