dont overwrite other bucket shifts during assignment

pull/1/head
parent d1e06d00ec
commit 534b504460

@ -51,7 +51,9 @@ class TeamMember(models.Model):
) )
# easy part: enough free shifts for everyone: # easy part: enough free shifts for everyone:
shifts = free_bucket.order_by("?")[:shift_count] shifts = free_bucket.order_by("?")[:shift_count]
self.fallback_shifts.set(shifts) for shift in shifts:
self.fallback_shifts.add(shift)
# there is a chance that even if qota*teammembers team members are activatet, there are still unasigned shifts # there is a chance that even if qota*teammembers team members are activatet, there are still unasigned shifts
# this happens if there are shifts with multiple people left, as we can not assign multiple slots for # this happens if there are shifts with multiple people left, as we can not assign multiple slots for
# the same shift to one member. # the same shift to one member.

Loading…
Cancel
Save