dont overwrite other bucket shifts during assignment
This commit is contained in:
parent
d1e06d00ec
commit
534b504460
|
@ -51,7 +51,9 @@ class TeamMember(models.Model):
|
|||
)
|
||||
# easy part: enough free shifts for everyone:
|
||||
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
|
||||
# this happens if there are shifts with multiple people left, as we can not assign multiple slots for
|
||||
# the same shift to one member.
|
||||
|
|
Loading…
Reference in New Issue