Skip to content

Commit

Permalink
Update beesdoo_shift/models/cooperative_status.py
Browse files Browse the repository at this point in the history
Co-authored-by: Carmen Bianca Bakker <carmen@coopiteasy.be>
  • Loading branch information
robinkeunen and carmenbianca authored Mar 4, 2022
1 parent 15ba9a9 commit 903767d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions beesdoo_shift/models/cooperative_status.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,8 +453,7 @@ def _compute_next_shift(self):
next_shift_by_worker = {}
for shift in next_shifts:
# take fist shift for each worker
if shift.worker_id.id not in next_shift_by_worker:
next_shift_by_worker[shift.worker_id.id] = shift
next_shift_by_worker.setdefault(shift.worker_id.id, shift)

for rec in self:
rec.next_shift_id = next_shift_by_worker.get(rec.cooperator_id.id)
Expand Down

0 comments on commit 903767d

Please sign in to comment.