Skip to content

Commit

Permalink
[FIX] website_hr_recruitement: allow to map the list 2 times.
Browse files Browse the repository at this point in the history
Don't uses generator, since some code need to access after the foreach on 'jobs'.
  • Loading branch information
JKE-be committed Aug 17, 2017
1 parent 6d43322 commit a313bcf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/website_hr_recruitment/controllers/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ def jobs(self, country=None, department=None, office_id=None, **kwargs):
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

Expand Down

0 comments on commit a313bcf

Please sign in to comment.