Skip to content

Commit

Permalink
Merge PR #534 into 12.0
Browse files Browse the repository at this point in the history
Signed-off-by huguesdk
  • Loading branch information
github-grap-bot committed Nov 1, 2024
2 parents 227bca5 + 4a08b6e commit ddcfbef
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions beesdoo_shift_swap/models/planning.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ def _prepare_task_day(self):

swap_subscription_done = []
for shift in shifts:
for rec in changes:
shift, swap_subscription_done, done = rec.update_shift_data(
shift, swap_subscription_done
)
if done:
changes.remove(rec)
# process the remaining changes and create a new list containing
# only the changes that have not be processed yet.
changes = [
rec
for rec in changes
# 3rd returned element is a boolean telling whether it was done
if not rec.update_shift_data(shift, swap_subscription_done)[2]
]

return shifts

0 comments on commit ddcfbef

Please sign in to comment.